Skip to main content

query_history

Operations on a query_history resource.

Overview

Namequery_history
TypeResource
Iddatabricks_workspace.dbsql.query_history

Fields

NameDatatype
channel_usedobject
durationinteger
endpoint_idstring
error_messagestring
executed_as_user_idinteger
executed_as_user_namestring
execution_end_time_msinteger
is_finalboolean
lookup_keystring
metricsobject
plans_statestring
query_end_time_msinteger
query_idstring
query_start_time_msinteger
query_textstring
rows_producedinteger
spark_ui_urlstring
statement_typestring
statusstring
user_idinteger
user_namestring
warehouse_idstring

Methods

NameAccessible byRequired ParamsDescription
listSELECTdeployment_nameList the history of queries through SQL warehouses, and serverless compute.

SELECT examples

SELECT
channel_used,
duration,
endpoint_id,
error_message,
executed_as_user_id,
executed_as_user_name,
execution_end_time_ms,
is_final,
lookup_key,
metrics,
plans_state,
query_end_time_ms,
query_id,
query_start_time_ms,
query_text,
rows_produced,
spark_ui_url,
statement_type,
status,
user_id,
user_name,
warehouse_id
FROM databricks_workspace.dbsql.query_history
WHERE deployment_name = '{{ deployment_name }}';