For a Query that has failed, this command will restart the Query specified by the query_id. Before restarting a Query, the user should use DESCRIBE QUERY to check the logs and determine if it is worthwhile restarting the Query, or address issues before restarting the Query. Terminated Queries cannot be restarted.
Arguments
query_id
This specifies the unique identifier of the Query to restart. See LIST QUERIES to find out how to list all Queries that the user has access to. The first column (ID) in the response corresponds with the query_id.
Examples
Restart a Query
The following is an example of how to restart a Query. The LIST QUERIES command is used to find the query_id.
demo_db.public/demostore#LISTQUERIES;+--------------------------------------+-----------------+---------------+-------------------------------+----------+-------------------------------+-------------------------------+
| ID | Intended State | Actual State | Query | Owner | Created At | Updated At |
+======================================+=================+===============+===============================+==========+===============================+===============================+
| 3d716a1a-1c38-4a18-9365-9def343731b8 | running | errored | CREATE STREAM pageviews2 AS | sysadmin | 2023-02-08 22:08:25 +0000 UTC | 2023-02-09 00:11:14 +0000 UTC |
| | | | SELECT * FROM pageviews; | | | |
+--------------------------------------+-----------------+---------------+-------------------------------+----------+-------------------------------+-------------------------------+
demo_db.public/demostore#RESTARTQUERY3d716a1a-1c38-4a18-9365-9def343731b8;+-------+--------------------------------------+----------+------------------------------------------+|Type|Name|Command|Summary|+=======+======================================+==========+==========================================+|query|3d716a1a-1c38-4a18-9365-9def343731b8|UPDATE|query|||||3d716a1a-1c38-4a18-9365-9def343731b8|||||wasmarkedforrestart|+-------+--------------------------------------+----------+------------------------------------------+