Override variables in SQL code recipe

piyushk
Level 4
Override variables in SQL code recipe

Hi,

I have Snowflake connection with warehouse defined as variable. I am overriding this variable at project level, so that all recipes run on project level configured warehouse.

For few SQL recipes, I want to override the warehouse variable and use larger warehouse. Is there a way to do so in SQL recipes?

0 Kudos
3 Replies
Manuel
Dataiker Alumni

Hi,

If you search this community, you will find this other thread, https://community.dataiku.com/t5/Using-Dataiku/Multiple-Snowflake-Warehouse-in-Single-Connection/m-p...

Is it useful for your case?

Best regards

0 Kudos
piyushk
Level 4
Author

Hello Manuel,

Thank you for the reply. I read the community link shared by you, and it is having few points that I am aware of. But how can I override variables in SQL query code recipe.

 

Override variables.png

Thanks,

0 Kudos
stevef
Dataiker

Hi,

OK looks like you are familiar with the basics of variable expansion, if you want to use that to alter a warehouse from a SQL code recipe then you can simply use standard Snowflake notation. For example if you wanted to resize you could write: 

 

ALTER WAREHOUSE MY_WH SET WAREHOUSE_SIZE = MEDIUM;

 

Hope that helps,

Steve

0 Kudos