Is there a way to strip out attribute rules when exporting a feature class to a new file geodatabase?

460
6
11-15-2023 01:29 PM
MatthewBeal
Occasional Contributor III

I have a script that exports a feature class from geodatabase A to geodatabase B. Geodatabase A is our primary editing environment and the feature class has multiple attribute rules configured.

Geodatabase B frequently has ArcMap users that access it. No editing occurs on this database at all. It is strictly a view only database. The problem I am having is that exporting the feature class from A to B also brings across the attribute rules. Since ArcMap doesn't support attribute rules this just breaks the layer for those users until I manually go into the attribute rules for geodatabase B and disable them. Is there anyway to configure that export to not include attribute rules?

6 Replies
DanPatterson
MVP Esteemed Contributor
0 Kudos
MatthewBeal
Occasional Contributor III

Unfortunately not. All that does is disable the rule. ArcMap cannot read a feature class if any attribute rule is present, even if it is disabled. 

0 Kudos
avonmoos
Occasional Contributor

This might not be the best approach but create a script that exports the data to .shp and then imports those into your other gdb.

0 Kudos
MatthewBeal
Occasional Contributor III

I had tried that but it truncates the field names which can cause issues for the end users maps that are already configured to use the original non-truncated field. 

0 Kudos
DanPatterson
MVP Esteemed Contributor

field name length is a limitation of shapefiles

Geoprocessing considerations for shapefile output—ArcGIS Pro | Documentation

Field names cannot be longer than 10 characters.


... sort of retired...
0 Kudos
JayCary
Esri Contributor

How about deleting the attribute rules in the exported feature/object classes (followed by deleting the error layers)?

Delete Attribute Rule (Data Management)

0 Kudos