Replies: 2 comments 4 replies
-
My intuition here is that I must apply these Python-generated schema roles to existing YAML generated business roles in the Python module itself. However this feels like a bit of an antipattern / code maintainability challenge |
Beta Was this translation helpful? Give feedback.
-
Pattern matching for grants is just a little syntax sugar to prevent excessive repetition for configs with large number of schemas. It is only applied during parsing. You may generally find and copy-paste any blueprint generation code from parser. For example, this is where you may see how to generate a grant for schema role: https://github.com/littleK0i/SnowDDL/blob/master/snowddl/parser/business_role.py#L125-L137 Try finding relevant
|
Beta Was this translation helpful? Give feedback.
-
I am using Python programmatic config to generate a database & schemas which are exact clones of an existing db, but differ only in db name. This results in the creation of new schema tech roles containing the new db name prefix. I would like to assign these new schema roles to an existing business role defined in YAML config, but it seems that SnowDDL doesn't "know" about them during YAML resolution, because it resolves Python configs after YAML configs. Per the docs:
What I really need here is the following resolution sequence:
Is there are way to "force" a particular resolution order?
Reference Code
Python config for db / schema clone
Attempted application of Python generated schema reader role to existing business role:
^^ This fails with error:
Beta Was this translation helpful? Give feedback.
All reactions