https://dagster.io/ logo
#integration-snowflake
Title
# integration-snowflake
c

clay

03/24/2023, 2:01 PM
I cannot, for example, use
context.resources.snowflake.execute_queries(sql_queries=queries)
because it doesn't first
USE SECONDARY ROLES ALL
j

jamie

03/24/2023, 2:05 PM
right now there isn’t. the ability to run a custom function on resource creation is something we’re looking into. but i don’t have a timeline on when it might get implemented. one option for you could be to write your own snowflake resource that wraps the dagster provided snowflake resource class and runs the custom commands on creation
c

clay

03/24/2023, 2:06 PM
Thanks, Jamie. I've done that and it's fine. I'm trying to introduce some other team members to Dagster and get them up to speed and I was hoping for the simplicity of the built in methods.
j

jamie

03/24/2023, 2:08 PM
yeah it’d definitely be a really nice feature. like i said, it’s on our minds, just need to sort it out along with other priorities!
c

clay

03/24/2023, 2:08 PM
Of course. I understand! 🙂 Thanks
f

Félix Tremblay

03/24/2023, 4:50 PM
Hello @clay, in case you don't know. You might want to set
DEFAULT_SECONDARY_ROLES = ( 'ALL' )
to the users directly using CREATE USER or ALTER USER
❤️ 1
c

clay

03/24/2023, 5:24 PM
Thanks, @Félix Tremblay! Unfortunately, there are thousands of users and tens of thousands of tables, hundreds of roles, etc... with a lot of it cordoned off b/c of PII. I'm not the admin, but I can look into whether they would support that approach!
f

Félix Tremblay

03/24/2023, 5:39 PM
If your organization is managing Snowflake users using IAC (e.g. Terraform or Pulumi), it's straightforward to make sure that this setting is set properly and uniformly
❤️ 1
c

clay

03/24/2023, 5:41 PM
I'll look into it. Thanks for the tip!
4 Views