DESCRIBE QUERY STATE
Syntax
Description
This command provides a snapshot of the source relations' position in a terminated Streaming or Continuous Query created in the current Organization.
See Query on how streaming queries operate in DeltaStream.
The query is visible only 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 to which the user has access. 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 to which the user has access. 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 to which the user has access. The column (Version
) in the response corresponds with the query_version
. If query_name
is provided without a query_version
, the system uses the latest query_version
.
Examples
State for an active query
The following example shows that an active query does not report any state information:
State for a terminated query
The following example shows that the described query was operating on a single source, demodb.public.pagevviews
, in a store of type Kafka, and was at the offset 28899068
in partition 0
when the query was terminated:
Last updated