We have created a Branch Versioned geodatabase in SQL Server and successfully published the Parcel Fabric to our ArcGIS Enterprise Portal.
One challenge we are currently facing is determining the best practice for publishing the Parcel Fabric in a view-only format for use on our public-facing platform.
Specifically, we’re looking for guidance on how to:
- Publish a view-only version of the parcel fabric that is suitable for integration into public-facing web maps or apps.
Thank you!
I can think of a couple of ways of doing it with different pros and cons
No.1 is the easiest but it can slow editing performance if the public web service is heavily used.
No.2 can also slow editing performance but it allows integration with 3rd party, non Esri clients such as SSRS or Asset Management systems. Also the performance of the published service might be slower.
No.3 requires some script or other process to be designed and scheduled. Data in the read only copy is only as current as the last time the script ran. But it won't affect editing performance and can be integrated with 3rd party apps.
Here is some SQL to create a view of a branch versioned feature class that is part of a parcel fabric, No.2 above
CREATE view [t].[taxparcels_bVW] as
SELECT
a.*
FROM
t.TAXPARCELS a
-- Start branch versioning magic
WHERE a.GDB_ARCHIVE_OID IN (
SELECT GDB_ARCHIVE_OID
FROM
(
SELECT
GDB_ARCHIVE_OID,
ROW_NUMBER() OVER( PARTITION BY OBJECTID ORDER BY GDB_FROM_DATE DESC ) AS rn_,
GDB_IS_DELETE
FROM t.TAXPARCELS
WHERE GDB_BRANCH_ID IN (0)
AND GDB_FROM_DATE <= GETUTCDATE()
-- AND OBJECTID IN (
-- SELECT OBJECTID
-- FROM t.TAXPARCELS
--WHERE (RetiredByRecord IS NULL)
-- )
) AS br__
WHERE
br__.rn_ = 1
AND br__.GDB_IS_DELETE = 0
)
-- End branch versioning magic
-- Filter from sub result set
AND RetiredByRecord IS NULL
AND IsSeed <> 1
GO
*Edit - Some useful links
https://github.com/Esri/developer-support/tree/master/arcsde-sql/sql-server/branch-versioning