.show stored_query_result command

Applies to: ✅ Azure Data Explorer

Shows information on active stored query results.

Use .show stored_query_results to show information about active stored query results in the current database. This command is eventually consistent, meaning that there might be a short delay before recently created stored query results are returned.

Use .show stored_query_results storedQueryResultName to show information on a specific active stored query result in the current database. This command is strongly consistent as opposed to the version above.

Permissions

You must have Database Viewer permissions to run these commands.

Syntax

.show stored_query_results

.show stored_query_results storedQueryResultName

.show stored_query_result storedQueryResultName schema

Learn more about syntax conventions.

Parameters

Name Type Required Description
StoredQueryResultName string ✔️ Stored query result name that adheres to entity names rules.

Returns

Returns information about active stored query results in the current database.

Examples

The following example returns information about all existing stored query results in current database.

.show stored_query_results

Output

StoredQueryResultId Name DatabaseName PrincipalIdentity SizeInBytes RowCount CreatedOn ExpiresOn
c522ada3-e490-435a-a8b1-e10d00e7d5c2 Events TestDB aadapp=c28e9b80-2808-bed525fc0fbb 104372 1000000 2020-10-07 14:26:49.6971487 2020-10-08 14:26:49.6971487
ef3f6b6e-cedd-4b93-b453-1ce0d1add1ff Events2 TestDB aadapp=c28e9b80-2808-bed525fc0fbb 104410 1000000 2020-10-07 14:26:52.2100315 2020-10-08 14:26:52.2100315

The following example returns information about the stored query result Events in current database.

.show stored_query_results Events

Output

StoredQueryResultId Name DatabaseName PrincipalIdentity SizeInBytes RowCount CreatedOn ExpiresOn
c522ada3-e490-435a-a8b1-e10d00e7d5c2 Events TestDB aadapp=c28e9b80-2808-bed525fc0fbb 104372 1000000 2020-10-07 14:26:49.6971487 2020-10-08 14:26:49.6971487

The following example shows the schema of the stored query result Events.

.show stored_query_result Events schema

Output

StoredQueryResult Schema
Events [{"Column":"ID","Type":"guid"},{"Column":"EventName","Type":"string"},{"Column":"Time","Type":"datetime"}]