Hi all, is there a way to use prefect parameter in...
# ask-community
d
Hi all, is there a way to use prefect parameter in @contextlib.contextmanager? we have a function that's get's Snowflake credentials from AWS secrets, but at run time, we want to allow testers to be able to enter the Snowflake schema they like. so I tried to put a parameter for the schema in the flow run but it's not working.
1
a
I was discussing this problem in this post - you can essentially switch between multiple profiles that point to either separate workspaces or Orion instances and blocks within each environment can point to different Snowflake DBs and/or schemas - more posts in the series are coming soon
d
Thanks @Anna Geller! we currently have the different environments but they wanted this for a temporary schema so I thought it will be possible to do it through the parameters
a
you technically could set those as environment variables, but this wouldn't be clean and generally it's nicer to get environment parity between dev/prod also, different engineers can have their own blocks of the same block type when needed for testing/local development
many ways to tackle this for sure, you can explore what works best