commands
Operations on a commands
resource.
Overview
Name | commands |
Type | Resource |
Id | databricks_workspace.compute.commands |
Fields
Name | Datatype |
---|---|
id | string |
results | object |
status | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
commandstatus | SELECT | clusterId, commandId, contextId, deployment_name | Gets the status of and, if available, the results from a currently executing command. |
create | INSERT | deployment_name | Creates an execution context for running cluster commands. |
cancel | EXEC | deployment_name | Cancels a currently running command within an execution context. |
destroy | EXEC | deployment_name | Deletes an execution context. |
execute | EXEC | deployment_name | Runs a cluster command in the given execution context, using the provided language. |
SELECT
examples
SELECT
id,
results,
status
FROM databricks_workspace.compute.commands
WHERE clusterId = '{{ clusterId }}' AND
commandId = '{{ commandId }}' AND
contextId = '{{ contextId }}' AND
deployment_name = '{{ deployment_name }}';
INSERT
example
Use the following StackQL query and manifest file to create a new commands
resource.
- commands
- Manifest
/*+ create */
INSERT INTO databricks_workspace.compute.commands (
deployment_name,
data__clusterId,
data__language
)
SELECT
'{{ deployment_name }}',
'{{ clusterId }}',
'{{ language }}'
;
- name: your_resource_model_name
props:
- name: clusterId
value: string
- name: language
value: python