Export attribute rules from a dataset to a comma-separated values (.csv) file.
Attribute rules are only supported on enterprise geodatabase datasets.
This tool can be used in conjunction with the Import Attribute Rules tool.
The .csv file includes the following columns: NAME, DESCRIPTION, TYPE, SUBTYPE, FIELD, ISEDITABLE, TRIGGERINSERT, TRIGGERDELETE, TRIGGERUPDATE, SCRIPTEXPRESSION, ERRORNUMBER, ERRORMESSAGE, and EXCLUDECLIENTEVALUATION.
Columns Description Example
The name of the rule.
The description that was provided for the rule.
Operating pressure must be less than 300.
The type of attribute rule.
If the dataset has subtypes and the subtype is used in the rule definition, this will be the subtype name that the rule is applied to.
If applicable, the name of the field the rule is applied to.
A Boolean value that defines whether the attribute field is editable or not.
A Boolean value that defines whether the triggering events for the rule are set for insert edits or not.
A Boolean value that defines whether the triggering events for the rule are set for delete edits or not.
A Boolean value that defines whether the triggering events for the rule are set for update edits or not.
The Arcade script expression that defines the rule.
$feature.OPERATINGPRESSURE < 300
If applicable, the error number for the rule.
If applicable, the error message for the rule.
Invalid operating pressure. Must be less than 300.
A Boolean value that defines whether the rule will be supported for all clients or simple clients.
ExportAttributeRules_management (in_table, out_csv_file)
The table or feature class to export attribute rules from.
The folder location and name of the .csv file to be created.
Export the attribute rules from a feature class named GasPipes.
import arcpy arcpy.ExportAttributeRules_management("C:\\MyProject\\MyDatabase.sde\\pro.USER1.GasPipes", "C:\\MyProject\\ExpAttrRulesFrBuilding.csv")
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes