Select to view content in your preferred language

Attribute Rules Slowing Python Scripts Down Exponentially

223
2
a week ago
HenriettaK
Occasional Contributor

Hello, Enterprise Community! I am encountering an issue with my nightly Python script batch since implementing attribute rules. I have noticed that all of the scripts that reference the feature class that now has the attribute rules applied have slowed exponentially, and the batch no longer completes within the given time frame. For reference, our batch has around doubled the amount of time that it takes to finish since implementing these rules. I have only implemented 2 simple rules on a single feature class in one of our enterprise geodatabases. The rules do not allow nulls in one field and then do not allow duplicate names in another field.

 

Is it possible to automatically disable attribute rules after a certain time of day, so that they would be disabled when our nightly batch runs and only be enabled when editing is occurring during the day? If this is not possible, are there some ways to improve the performance of my batch with these attribute rules in place? 

 

Thanks so much for the help!

0 Kudos
2 Replies
Brian_McLeer
Frequent Contributor

You could potentially use the ArcPy snippet from the GP Tools and create two scripts, one to disable attribute rules and one to enable with your existing scripts running in between. 

Brian_McLeer_0-1756919602751.png

 

HenriettaK
Occasional Contributor

Thanks for your response, Brian! I think we will try something along these lines!