Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Privileges needed to execute task in Snowflake?

I struggle to set the correct privileges to execute tasks.

When I try to run a task graph (using the UI: Data > Databases > {db} > {schema} > Tasks > {my_task}), I cannot click the execute button, it says "Only task owners or users with the operate privilege may execute tasks."

My current role already has the execute task privilege for the entire account:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

GRANT EXECUTE TASK ON ACCOUNT TO ROLE {myrole};

Evidently that’s not enough, so I tried this:

GRANT OPERATE ON TASK {my_task} TO ROLE {myrole};

This works, but it doesn’t work for all tasks / future tasks, like this:

GRANT OPERATE ON ALL TASKS TO ROLE {myrole}; -- Unsupported feature 'ALL'.

I have hundreds of tasks. Is there a way around setting the OPERATE privilege (or changing the ownership) to all of them – and remembering to set it for all future tasks?

Thanks a lot for any hints!

>Solution :

GRANT OPERATE ON ALL TASKS TO ROLE {myrole}; — Unsupported feature ‘ALL’.

IN DATABASE/SCHEMA should be provided:

GRANT OPERATE ON ALL TASKS IN DATABASE <db_name> TO ROLE <role_name>;
GRANT OPERATE ON FUTURE TASKS IN DATABASE <db_name> TO ROLE <role_name>; 
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading