DESCRIBE QUERY

Syntax

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

Description

This command provides additional information about a 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.

See also DESCRIBE QUERY METRICS, DESCRIBE QUERY EVENTS, DESCRIBE QUERY STATE.

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 you have 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 you have 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 you have access. The column (Version) in the response corresponds with the query_version.

Examples

Describe a simple query

The following describes a simple query with a Changelog source relation, users_log, filtering on a userid column and writing the results into a Changelog sink relation, users2468_log:

demodb.analytics/demostore# DESCRIBE QUERY b2041101-c37c-4807-93d4-2de876b7bd39;
+-----------+--------------------------------+
|  Property |  Value                         |
+===========+================================+
| state     | running                        |
+-----------+--------------------------------+
| source    | changelog users_log            |
+-----------+--------------------------------+
| sink      | changelog users2468_log        |
+-----------+--------------------------------+

demodb.analytics/demostore# DESCRIBE QUERY demoquery:1;
+-----------+--------------------------------+
|  Property |  Value                         |
+===========+================================+
| state     | running                        |
+-----------+--------------------------------+
| source    | changelog users_log            |
+-----------+--------------------------------+
| sink      | changelog users2468_log        |
+-----------+--------------------------------+

Describe a multi-source query

The following describes a JOIN query that joins a Stream, pageviews, and a Changelog relation, users_log, on a userid column and writes the resulting records into a pv_user2468_interest changelog relation:

demodb.analytics/demostore# DESCRIBE QUERY c81fc632-a043-472d-a1fe-aa81bc9078df;
+-----------+--------------------------------+
|  Property |  Value                         |
+===========+================================+
| state     | running                        |
+-----------+--------------------------------+
| source    | changelog users_log            |
+-----------+--------------------------------+
| source    | stream pageviews               |
+-----------+--------------------------------+
| sink      | stream pv_user2468_interest    |
+-----------+--------------------------------+

demodb.analytics/demostore# DESCRIBE QUERY demoquery:1;
+-----------+--------------------------------+
|  Property |  Value                         |
+===========+================================+
| state     | running                        |
+-----------+--------------------------------+
| source    | changelog users_log            |
+-----------+--------------------------------+
| source    | stream pageviews               |
+-----------+--------------------------------+
| sink      | stream pv_user2468_interest    |
+-----------+--------------------------------+

Describe an ERRORED query

The following describes a query stopped due to an unrecoverable failure, leaving it in the ERRORED state:

demodb.analytics/demostore# DESCRIBE QUERY c81fc632-a043-472d-a1fe-aa81bc9078df;
+-----------+-----------------------+
|  Property |  Value                |
+===========+=======================+
| state     | errored               |
+-----------+-----------------------+
| source    | stream pageviews      |
+-----------+-----------------------+
| sink      | stream users          |
+-----------+-----------------------+
| error     | <error stack here>    |
+-----------+-----------------------+

demodb.analytics/demostore# DESCRIBE QUERY demoquery:1;
+-----------+-----------------------+
|  Property |  Value                |
+===========+=======================+
| state     | errored               |
+-----------+-----------------------+
| source    | stream pageviews      |
+-----------+-----------------------+
| sink      | stream users          |
+-----------+-----------------------+
| error     | <error stack here>    |
+-----------+-----------------------+

Last updated