DESCRIBE QUERY EVENTS

Syntax

DESCRIBE QUERY EVENTS [query_id | query_name[:query_version]];

Description

This command provides a list of events for a Streaming or Continuous Query created in the current Organization.

See Query on how streaming queries operate in DeltaStream.

The Query will only be visible if the current role has USAGE privileges.

Arguments

query_id

This is the unique identifier of the Query to describe. 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.

query_name

This is the name of the Query to describe. See LIST QUERIES to find out how to list all Queries that the user has access to. The column (Name) in the response corresponds with the query_name. The query_version property disambiguates between multiple queries with the same name.

query_version

This is the version of the Query to describe. See LIST QUERIES to find out how to list all Queries that the user has access to. The column (Version) in the response corresponds with the query_version. If query_name is provided without a query_version, the latest query_version will be used.

Examples

Show Query events when running and stopped

demodb.public/demostore# DESCRIBE QUERY EVENTS 5b9ba120-bb59-4c95-82c5-6ee0f78dc75e;
+-------------------------------+----------------------+---------+-----------+
|           Created At          |        Actor         |   Type  |  Messages |
+-------------------------------+----------------------+---------+-----------+
| 2024-08-09 15:45:32 +0000 UTC | system               | running |           |
+-------------------------------+----------------------+---------+-----------+
| 2024-08-09 15:45:01 +0000 UTC | delta@deltastream.io | created |           |
+-------------------------------+----------------------+---------+-----------+

demodb.public/demostore# DESCRIBE QUERY EVENTS demoquery:1;
+-------------------------------+----------------------+---------+-----------+
|           Created At          |        Actor         |   Type  |  Messages |
+-------------------------------+----------------------+---------+-----------+
| 2024-08-09 15:45:32 +0000 UTC | system               | running |           |
+-------------------------------+----------------------+---------+-----------+
| 2024-08-09 15:45:01 +0000 UTC | delta@deltastream.io | created |           |
+-------------------------------+----------------------+---------+-----------+

demodb.public/demostore# DESCRIBE QUERY EVENTS 24f5a97b-97e9-40eb-8dbf-431b96474972;
+-------------------------------+----------------------+---------------------+-----------+
|           Created At          |        Actor         |         Type        |  Messages |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:47:57 +0000 UTC | system               | terminated          |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:47:40 +0000 UTC | delta@deltastream.io | terminate_requested |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:45:32 +0000 UTC | system               | running             |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:45:01 +0000 UTC | delta@deltastream.io | created             |           |
+-------------------------------+----------------------+---------------------+-----------+

demodb.public/demostore# DESCRIBE QUERY EVENTS demoquery:1;
+-------------------------------+----------------------+---------------------+-----------+
|           Created At          |        Actor         |         Type        |  Messages |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:47:57 +0000 UTC | system               | terminated          |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:47:40 +0000 UTC | delta@deltastream.io | terminate_requested |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:45:32 +0000 UTC | system               | running             |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:45:01 +0000 UTC | delta@deltastream.io | created             |           |
+-------------------------------+----------------------+---------------------+-----------+

Show events for a Query that has been rescheduled

Queries can be reschedule for any number of reasons. Typically a query is rescheduled if a query needs to be moved to another node.

demodb.public/demostore# DESCRIBE QUERY EVENTS demoquery:1;
+-------------------------------+----------------------+---------------------+-----------+
|           Created At          |        Actor         |         Type        |  Messages |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:47:57 +0000 UTC | system               | running             |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:47:40 +0000 UTC | system               | rescheduled         |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:45:32 +0000 UTC | system               | running             |           |
+-------------------------------+----------------------+---------------------+-----------+
| 2024-08-09 15:45:01 +0000 UTC | delta@deltastream.io | created             |           |
+-------------------------------+----------------------+---------------------+-----------+

The following example shows a Query that errored

testdb.public/internal_stage# DESCRIBE QUERY EVENTS 142ecf31-bc8d-496b-bd0b-28ebb4a8757e;
+-------------------------------+----------------------+---------------------+------------------+
|           Created At          |        Actor         |         Type        |      Messages    |
+-------------------------------+----------------------+---------------------+------------------+
| 2024-08-09 15:46:32 +0000 UTC | system               | errored             |  <error_message> |
+-------------------------------+----------------------+---------------------+------------------+
| 2024-08-09 15:45:32 +0000 UTC | system               | running             |                  |
+-------------------------------+----------------------+---------------------+------------------+
| 2024-08-09 15:45:01 +0000 UTC | delta@deltastream.io | created             |                  |
+-------------------------------+----------------------+---------------------+------------------+

Last updated