Hi all,
I am trying to set some specific privileges on my dbt model using grants, but I can only get it to work whenever I set copy_grants=true. To me, this does not make sense, since from the description of Snowflake’s COPY GRANTS statement it seems that it copies the existing privileges into the new/replaced table. But this is not happening, since it completely overwrites all privileges previously set. However, when I run the model without copy_grants=true, all previous privileges are still there and it just appends all new privileges set in my grants config.
In short, this just appends new grants:
{{
config(
grants={"select": ["FFM_DATA_ANALYST_PII", "FFM_DATA_ENGINEER_PII"]}
)
}}
and this replaces all existing privileges:
{{
config(
copy_grants=true,
grants={"select": ["FFM_DATA_ANALYST_PII", "FFM_DATA_ENGINEER_PII"]}
)
}}
Am I misunderstanding how COPY GRANTS works?
Thanks!