Select to view content in your preferred language

Attribute rule causes error when copying data

671
2
05-04-2023 02:18 PM
by Anonymous User
Not applicable

....

0 Kudos
2 Replies
MichaelVolz
Esteemed Contributor

How about if you export the data instead of copy the data as that should remove any attribute rules?  I had to do this for a data set received from a vendor who had been using attribute rules in their geodatabase.

0 Kudos
Jake_S
by Esri Contributor
Esri Contributor

Morning,

I do not believe it is the code that is the issue but depending on what version of ArcGIS Pro and SQL Server are you using it might be. I have noticed in the past that with code that refences a database schema, e.g. GIS.xxxxxx, ArcGIS Pro can not handle this. In the latest release this is not the case. See below.

Also, this was not limited to file geodatabases but also other RDMBs. This issue was also presented in copying form one Oracle databases to another.

This issue seems to be resolved in later versions of ArcGIS Pro as in the example below I am using ArcGIS Pro 3.1.1 and a Postgres EGDB and copy and pasting a Attribute Rule that refences a database schema and table copies to the file geodatabase just fine. Road_Line AR refences the cch.owner1.ZIPCITIES table for data. Copying the Road_Lines to the Default.gdb also copied over the referenced ZIPCITIES table without me doing so.

The code on the enterprise database feature Road_Line referencing a database schema table

JS_Esri_1-1683286106749.png

Copy and paste successful of just the Road_Line and database schema table copied over on its own (ZIPCITIES). The attribute rule on Road_line drops the database schema.

JS_Esri_2-1683286244118.png

In the past I have had to export the Attribute Rules to xml using the Export Attribute Rules (Data Management) tool on the feature classes I want to copy. Then delete the rules using the Delete Attribute Rule (Data Management) tool form the feature class. Copy my data to the location I wanted (file geodatabase or EGDB) then restore the Attribute Rules with the Import Attribute Rules (Data Management) tool to the original and use on the new data. 

Not sure this helps but my help knowing that you are not alone.

~Jake

0 Kudos