I cannot, for example, use `context.resources.snow...
# integration-snowflake
c
I cannot, for example, use
context.resources.snowflake.execute_queries(sql_queries=queries)
because it doesn't first
USE SECONDARY ROLES ALL
j
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
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
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
Of course. I understand! 🙂 Thanks
f
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
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
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
I'll look into it. Thanks for the tip!