โ06-04-2024 09:46 AM
We have an external service connecting to a SQL Warehouse, running a query that normally lasts 30 minutes.
On occasion an error occurs and it will run for 6 hours.
This happens overnight and is contributing to a larger bill. Is there any way to force long running queries to time out or the SQL Warehouse to have a limited keep-alive time even if there are active queries?
โ06-04-2024 03:57 PM
Hello @Kayla , I hope this message finds you well.
Have you tried the STATEMENT_TIMEOUT?
The STATEMENT_TIMEOUT configuration parameter sets a timeout value in seconds. Any Databricks SQL statement with a wall clock run time exceeding the value is timed out.
You can set this parameter at the session level using the SET statement and at the global level using Configure SQL parameters or SQL Warehouses API.
Best regards,
Lucas Rocha
โ06-04-2024 03:57 PM
Hello @Kayla , I hope this message finds you well.
Have you tried the STATEMENT_TIMEOUT?
The STATEMENT_TIMEOUT configuration parameter sets a timeout value in seconds. Any Databricks SQL statement with a wall clock run time exceeding the value is timed out.
You can set this parameter at the session level using the SET statement and at the global level using Configure SQL parameters or SQL Warehouses API.
Best regards,
Lucas Rocha
โ06-04-2024 03:57 PM - edited โ06-04-2024 03:57 PM
Hello @Kayla, maybe the STATEMENT_TIMEOUT configuration parameter is what you're looking for.
This parameter can be set at session or global level.
โ06-05-2024 04:10 AM
@lucasrocha @raphaelblg That is exactly what I was hoping to find. Thank you!
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group