How to persist editor tracking info during Apply Asset package?

276
3
Jump to solution
09-12-2019 10:12 PM
MindaugasRasiukevicius1
New Contributor III

Need to migrate data from GN to UN. Original data contains editor tracking info already. I have prepared AssetPackage with transformed data that contains original editor tracking fields.

During GP tool Apply Asset Package with Load Data option set all data has been loaded, but tracking fields are overwritten with current time and connected user info.

How to persist original editor tracking information from source data?

0 Kudos
1 Solution

Accepted Solutions
PaulLeBlanc1
Esri Contributor

Right now, you would need to create your UN and add the domain network manually, disable editor tracking, apply the asset package, and re-enable.

We are working on a solution for this is 2.5 where editor tracking will be maintained by default in import/export asset package.

View solution in original post

0 Kudos
3 Replies
PaulLeBlanc1
Esri Contributor

Right now, you would need to create your UN and add the domain network manually, disable editor tracking, apply the asset package, and re-enable.

We are working on a solution for this is 2.5 where editor tracking will be maintained by default in import/export asset package.

View solution in original post

0 Kudos
PaulLeBlanc1
Esri Contributor

untools 2.4.2* has the option to maintain editor tracking (it is disabled by default) for both import/export.

Before running the GP tool, open a Python window and execute the following:

import untools
untools.common.settings.MAINTAIN_EDITOR_TRACKING = True

* it is currently planned to be released in the first week of October

0 Kudos
KevinKirkwood
New Contributor III

You can use the following Python Code to disable editor tracking when applying an asset package and the Editor Tracking fields will be maintained when it appends the data. 

You need to Stage the Utility Network, Apply Asset Package schema only ( This is important in order for it to work ), run the following Python Script, then Apply Asset Package with load data box checked.

enterpriseGdb = r"C:\Projects\ENTERPRISE DATABASE PATH"

tables = [
"{}\\{}\\ElectricDistributionAssembly".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricDistributionDevice".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricDistributionJunction".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricDistributionLine".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricDistributionSubnetLine".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricTransmissionAssembly".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricTransmissionDevice".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricTransmissionJunction".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricTransmissionLine".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ElectricTransmissionSubnetLine".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\ServiceTerritory".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\StructureBoundary".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\StructureJunction".format(enterpriseGdb, "UtilityNetwork"),
"{}\\{}\\StructureLine".format(enterpriseGdb, "UtilityNetwork"),
"{}\\JointUse".format(enterpriseGdb),
]

for table in tables:
arcpy.management.DisableEditorTracking(table)

After you load the data then run the same script again but change the last line of the code to:

arcpy.management.EnableEditorTracking(table)

I don't think there is a way to export an asset package and maintain the editor tracking fields yet. 

Hope this helps!

6.2.6
0 Kudos