query_history
Creates, updates, deletes, gets or lists a query_history
resource.
Overview
Name | query_history |
Type | Resource |
Id | databricks_workspace.dbsql.query_history |
Fields
The following fields are returned by SELECT
queries:
- list
Request completed successfully.
Name | Datatype | Description |
---|---|---|
endpoint_id | string | |
executed_as_user_id | integer | |
query_id | string | |
user_id | integer | |
warehouse_id | string | |
executed_as_user_name | string | |
user_name | string | |
channel_used | object | |
duration | integer | |
error_message | string | |
execution_end_time_ms | integer | |
is_final | boolean | |
lookup_key | string | |
metrics | object | |
plans_state | string | |
query_end_time_ms | integer | |
query_start_time_ms | integer | |
query_text | string | |
rows_produced | integer | |
spark_ui_url | string | |
statement_type | string | |
status | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | deployment_name | List the history of queries through SQL warehouses, and serverless compute. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- list
List the history of queries through SQL warehouses, and serverless compute.
SELECT
endpoint_id,
executed_as_user_id,
query_id,
user_id,
warehouse_id,
executed_as_user_name,
user_name,
channel_used,
duration,
error_message,
execution_end_time_ms,
is_final,
lookup_key,
metrics,
plans_state,
query_end_time_ms,
query_start_time_ms,
query_text,
rows_produced,
spark_ui_url,
statement_type,
status
FROM databricks_workspace.dbsql.query_history
WHERE deployment_name = '{{ deployment_name }}' -- required;