ArcPro Versioning Ribbon has a great button: Version Changes. This provides a categorized list of edits in the given version in a nice little UI window. However from there, automation, advanced QA/QC, auditing, event triggering and integrations are difficult if not impossible. The data result of this button would be tremendously useful for those operations as a GP tool.... the Versions Toolset makes sense.
An advanced SQL management topic or SDE stored procedure would also be ideal but I understand the complexity there.
---------------------------------------------------------------------------------------------
Solved: Re: Python or SQL for 'Version Changes'? - Esri Community
---------------------------------------------------------------------------------------------
ArcGIS Pro "Version Changes" is not exposed as a geoprocessing tool therefore it is also not exposed in arcpy.
An overview of the Versions toolset—ArcGIS Pro | Documentation
An overview of ArcPy functions—ArcGIS Pro | Documentation
I agree that ArcGIS Pro "Version Changes" needs to be available as an arctoolbox geoprocessing tool and in arcpy for users.
---------------------------------------------------------------------------------------------
The alternative for users is to use the ArcGIS Pro SDK for .NET.
ArcGIS Pro SDK | Documentation
FeatureClass Class—ArcGIS Pro - Featureclass.Differences
Solved: Version Differences - Esri Community - this link has a code example.
---------------------------------------------------------------------------------------------
Another alternative for users is to use FME Workbench.
Extracting Differences from an ArcSDE Geodatabase (safe.com)
Note: I am not sure if the same FME transformer functionality is present in the ArcGIS Pro Data Interoperability Extension, but if it is then users could use an ArcGIS Pro Model Builder to call the ArcGIS Pro Data Interoperability Transformer to get the "Version Changes".
---------------------------------------------------------------------------------------------
There in no way to see the "Version Changes" using SQL to access the Geodatabase.
Edit versioned data in SQL Server using SQL—ArcMap | Documentation (arcgis.com)
---------------------------------------------------------------------------------------------
Thanks,
| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
“ I do not fear computers. I fear the lack of them. ” - Isaac Asimov
Agree. This is needed.
For branch versioned feature classes, the version differences can be found with the REST API. This was implicitly mentioned here with the ArcGIS Pro .NET SDK using the Differences method.
Differences—ArcGIS REST APIs | ArcGIS Developers
It is also possible to retrieve the differences with the ArcGIS Python API
arcgis.features.managers module | ArcGIS API for Python
from arcgis import GIS
from arcgis.features._version import VersionManager
gis = GIS(
"https://server.domain.com/webadaptor/",
"user",
"password"
)
version_manager_url = ("https://server.domain.com/webadaptor/rest/services/FeatureServiceName/VersionManagementServer")
version_management_server = VersionManager(version_manager_url , gis)
with version_management_server.get("owner.version_name", "read") as version:
differnces = version.differences(result_type="features", layers=[15])
''' Result:
{
"differences" : [
{
"layerId" : long,
"inserts" : [ <objectId> ],
"updates" : [ <objectId> ],
"deletes" : [ <objectId> ]
}
],
"features" : [
{
"layerId" : long,
"inserts" : [
{
"attributes" : {
"OBJECTID" : 581,
"SUBTYPE" : 3,
. . .
"SHAPE.STLength()" : 132.5
},
"geometry" : {
"hasZ" : true,
"hasM" : true,
"paths" : [
. . .
],
"success" : <true | false>,
'''
@KenGalliher1 Thanks! That's great. Unfortunately my particular case at the moment is 'traditional' versioning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.