query_history
Operations on a query_history
resource.
Overview
Name | query_history |
Type | Resource |
Id | databricks_workspace.dbsql.query_history |
Fields
Name | Datatype |
---|---|
channel_used | object |
duration | integer |
endpoint_id | string |
error_message | string |
executed_as_user_id | integer |
executed_as_user_name | string |
execution_end_time_ms | integer |
is_final | boolean |
lookup_key | string |
metrics | object |
plans_state | string |
query_end_time_ms | integer |
query_id | string |
query_start_time_ms | integer |
query_text | string |
rows_produced | integer |
spark_ui_url | string |
statement_type | string |
status | string |
user_id | integer |
user_name | string |
warehouse_id | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
list | SELECT | deployment_name | List 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 }}';