Label | Explanation | Data Type |
Input Table
| The table or feature class from which the attribute rules will be exported. | Table View |
Output File
| The folder location and name of the .csv file that will be created. | File |
Summary
Exports attribute rules from a dataset to a comma-separated values file (.csv).
Usage
This tool can be used in conjunction with the Import Attribute Rules tool.
The output .csv file will include the following columns:
Column Description Example NAME
The name of the rule.
constraintRuleOP
DESCRIPTION
The rule description.
Operating pressure must be less than 300.
TYPE
The type of attribute rule.
CONSTRAINT, CALCULATION
SUBTYPE
If the dataset has a subtype and the subtype is used in the rule definition, this is the subtype name (also known as description) to which the rule is applied.
ALL
FIELD
The name of the field to which the rule is applied, if applicable.
CONDITION
ISEDITABLE
A Boolean value that defines whether the attribute field is editable.
True or False
TRIGGERINSERT
A Boolean value that defines whether the triggering events for the rule are set for insert edits.
True or False
TRIGGERDELETE
A Boolean value that defines whether the triggering events for the rule are set for delete edits.
True or False
TRIGGERUPDATE
A Boolean value that defines whether the triggering events for the rule are set for update edits.
True or False
SCRIPTEXPRESSION
The ArcGIS Arcade script expression that defines the rule.
$feature.OPERATINGPRESSURE < 300
ERRORNUMBER
The error number for the rule, if applicable.
99
ERRORMESSAGE
The error message for the rule, if applicable.
Invalid operating pressure. The value must be less than 300.
EXCLUDECLIENTEVALUATION
A Boolean value that defines whether the rule is supported for all clients or simple clients.
True or False
ISENABLED
A Boolean value that defines whether the attribute rule is enabled.
True or False
BATCH
A Boolean value that defines whether the rule supports batch validation.
True or False
SEVERITY
An integer value (1–5) that defines the severity of the error.
2
TAGS
A set of string values that identify the rule.
Operating pressure
CATEGORY
A system-generated integer value that defines the rule category, if applicable.
This value is system generated and should not be modified.
6
CHECKPARAMETERS
A system-generated JSON value that defines the configuration of a Data Reviewer-based rule.
This value is system generated and should not be modified.
{"ReviewerRuleType": "0", "minimumangle": "60"}
TRIGGERINGFIELDS
A list of field values representing the fields where an edit occurs that will trigger the attribute rule.
Note:
An empty array defined as [] represents all fields as triggering fields. When no triggering fields are specified, all fields are listed as triggering fields.["RoadCondition", "NumberOfLanes", "RoadType"]
Parameters
arcpy.management.ExportAttributeRules(in_table, out_csv_file)
Name | Explanation | Data Type |
in_table | The table or feature class from which the attribute rules will be exported. | Table View |
out_csv_file | The folder location and name of the .csv file that will be created. | File |
Code sample
Export the attribute rules from a feature class named GasPipes.
import arcpy
arcpy.management.ExportAttributeRules("C:\\MyProject\\MyDatabase.sde\\pro.USER1.GasPipes",
"C:\\MyProject\\ExpAttrRulesFrBuilding.csv")