I have a dbt job running once a day, and the dataset is shared out to a reader account in Snowflake. The dbt job is recreating the dataset as a table daily using create or replace transient table as ...
, which causes the reader account to lose permissions on the table everytime the job runs. I tried grant select on future tables in schema my_db.my_schema to share my_share;
but got the following error:
Future grant on objects of type TABLE to SHARE is restricted.
What is the best practice for dealing with this scenario for reader accounts? I've seen this which is a nice solution, but I have to imagine there is a better way than adding a post-hook to every marts model in dbt.