Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Add configuration options to execute pre/post process queries #246

Open
zyzil opened this issue Jan 19, 2022 · 2 comments
Open

Add configuration options to execute pre/post process queries #246

zyzil opened this issue Jan 19, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@zyzil
Copy link

zyzil commented Jan 19, 2022

Several singer.io taps have configuration options to allow executing queries prior to starting the sync and when the sync is completed. This is often used to prepare the target before the load or finalize something after the load.

In particular, I would like to be able to explicitly suspend the warehouse that the singer.io target is using as soon as the process completes to optimize for cost. I believe that common generic pattern of pre/post queries would allow for this functionality.

An alternative to this would be to add a specific configuration option to suspend the warehouse on completion.

@zyzil zyzil added the enhancement New feature or request label Jan 19, 2022
@Samira-El
Copy link
Contributor

Hey Kevin,

add a specific configuration option to suspend the warehouse on completion.

I reckon you don't need this target to issue suspend queries when the warehouse can be configured to do so from Snowflake side with the AUTO_SUSPEND parameter, see https://docs.snowflake.com/en/sql-reference/sql/alter-warehouse.html#properties-parameters

@zyzil
Copy link
Author

zyzil commented Jan 20, 2022

I'm familiar with the auto suspend parameter. I use this already; however, I would like to further cost optimize beyond the auto suspend.

For example, if I am running an ETL pipeline once an hour to keep a data source synchronized to Snowflake, you will have five minutes per hour of idle warehouse compute which will be billed. Since I know I no longer need my ETL warehouse for the hour, I would like to issue a statement to instantaneously suspend the warehouse and avoid additional billing.

Thanks!
Kevin

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants