Delete Attribute Rule (Data Management)

Summary

Deletes one or more attribute rules from a dataset.

Learn more about attribute rules

Usage

  • If you specify both a rule name and a rule type when running this tool, the tool will verify that the rule matches the rule type. If they do not match, the rule will not be deleted.

Parameters

LabelExplanationData Type
Input Table

The table or feature class containing the attribute rules that will be deleted.

Table View
Rule Names

The names of the rules that will be deleted from the dataset.

String
Type
(Optional)

Specifies the type of attribute rules that will be deleted.

  • Calculation—Calculation rules, filtered from the Rule Names parameter value, will be deleted .
  • Constraint—Constraint rules, filtered from the Rule Names parameter value, will be deleted.
  • Validation—Validation rules, filtered from the Rule Names parameter value, will be deleted.

  • CalculationCalculation rules will be deleted.
  • ConstraintConstraint rules will be deleted.
  • ValidationValidation rules will be deleted.
String

Derived Output

LabelExplanationData Type
Attribute Rules Deleted

The updated input table with one or more attribute rules deleted.

Table View; Raster Layer; Mosaic Layer

arcpy.management.DeleteAttributeRule(in_table, names, {type})
NameExplanationData Type
in_table

The table or feature class containing the attribute rules that will be deleted.

Table View
names
[names,...]

The names of the rules that will be deleted from the dataset.

String
type
(Optional)

Specifies the type of attribute rules that will be deleted.

  • CALCULATIONCalculation rules will be deleted.
  • CONSTRAINTConstraint rules will be deleted.
  • VALIDATIONValidation rules will be deleted.
String

Derived Output

NameExplanationData Type
out_table

The updated input table with one or more attribute rules deleted.

Table View; Raster Layer; Mosaic Layer

Code sample

DeleteAttributeRule example (Python window)

Delete two specific calculation attribute rules from a feature class.

import arcpy
arcpy.management.DeleteAttributeRule(
    "C:\\MyProject\\MyDatabase.sde\\pro.USER1.campusData", "Rule A;Rule B", 
    "CALCULATION")

Environments

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics