hey team
How can i check if a validation rule exists or not by python code?
h
hundreds-photographer-13496
09/07/2022, 9:20 AM
Hi @salmon-rose-54694, can you please elaborate ? Are you already checking it any other way ? Is the question about checking if an assertion exists or not
g
gifted-knife-16120
09/07/2022, 7:52 PM
I think every validation rule is stored in URN. Can query by URN and check it?
s
salmon-rose-54694
09/07/2022, 11:12 PM
@hundreds-photographer-13496 Yes. I use airflow to validation rules and set result to datahub daily. In airflow dag I will create rules first but i don’t want to create them every day. So i thought can i check if the rule exists or not. If yes then i pass the creation.
salmon-rose-54694
09/07/2022, 11:13 PM
@gifted-knife-16120 Yes, this could be an approach.