I have a table in an Oracle ArcSDE database where I have joined a feature layer and a table view, the resulting data set is a feature layer with fields from both datasets.
In my script I use a version of the database to make the feature layer from the feature class and execute the join. The join could not be executed due to a locked schema, so I took this route.
I would like to simply reconcile and post the joined feature layer to my SDE.DEFAULT version.
My code below shows my script so far. It does not return any errors; however the "line_dev_layer" and 'aVersion' are not reconciled and posted back to "SDE.DEFAULT".
When I execute the script in ArcGIS for Desktop the TableView and the Feature Layer join successfully. Additionally, the reconcile returns as successful too.
What could be the cause of this? No errors are returned when I run this script standalone or in the Python window in ArcGIS for Desktop.
linefc = 'C:\GIS Projects\Korterra Script\TEST_PORTAL_SCG.sde\SEU_GIS_GAS.Korterra\SEU_GIS_GAS.line_tickets_DEV'
mobiletable = r'C:\GIS Projects\Korterra Script\TEST_PORTAL_SCG.sde\SEU_GIS_GAS.MobileIDs_District'
db = 'C:\\GIS Projects\\Korterra Script\\TEST_PORTAL_SCG.sde'
copiedFC = 'line_tickets_dev_joined'
fds = 'C:\GIS Projects\Korterra Script\TEST_PORTAL_SCG.sde\SEU_GIS_GAS.Korterra'
Parent = "SDE.DEFAULT"
##print "Creating Version"
##arcpy.CreateVersion_management (r'C:\GIS Projects\Korterra Script\TEST_PORTAL_SCG.sde', Parent, 'KorTerraVersionTest', "PUBLIC")
print "Creating Feature Layer"
print "Changing FC Version"
arcpy.ChangeVersion_management("line_dev_layer", 'TRANSACTIONAL', 'SEU_GIS_GAS.KorTerraVersionTest', '')
print "Creating Table View"
print "Changing Table Version"
arcpy.ChangeVersion_management("MobileView", 'TRANSACTIONAL', 'SEU_GIS_GAS.KorTerraVersionTest', '')
print "Joining Fields"
arcpy.AddJoin_management("line_dev_layer", "MOBILEID", "MobileView", "Mobile")
##arcpy.FeatureClassToFeatureClass_conversion("line_dev_layer", fds, copiedFC)
arcpy.ChangeVersion_management('line_dev_layer', "TRANSACTIONAL", "SDE.DEFAULT", '')
print "Reconciling Versions"
arcpy.ReconcileVersions_management(db,"", "SDE.DEFAULT", 'SEU_GIS_GAS.KorTerraVersionTest', with_post = "POST", with_delete = "KEEP_VERSION" )