Skip to content

Commit 92ee2e3

Browse files
docs: add timeout setting documentation (#411)
1 parent 77a5495 commit 92ee2e3

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docsrc/Connecting_and_queries.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,3 +626,20 @@ You can import this module as follows:
626626

627627
from datetime import datetime
628628

629+
Execution timeout
630+
==============================
631+
632+
The Firebolt Python SDK allows you to set a timeout for query execution.
633+
In order to do this, you can call the :meth:`Cursor.execute` or :meth:`Cursor.executemany` function with the
634+
``timeout_seconds`` parameter provided. In case the timeout will be reached before the query execution finishes, the
635+
function will raise a ``QueryTimeoutError`` exception.
636+
637+
::
638+
639+
cursor.execute(
640+
"SELECT * FROM test_table;",
641+
timeout_seconds=5
642+
)
643+
644+
**Warning**: If running multiple queries, and one of queries times out, all the previous queries will not be rolled back and their result will persist. All the remaining queries will be cancelled.
645+

0 commit comments

Comments
 (0)