libraries
Creates, updates, deletes, gets or lists a libraries
resource.
Overview
Name | libraries |
Type | Resource |
Id | databricks_workspace.compute.libraries |
Fields
The following fields are returned by SELECT
queries:
- clusterstatus
- allclusterlibrarystatuses
Request completed successfully.
Name | Datatype | Description |
---|---|---|
cluster_id | string | |
library_statuses | array |
Request completed successfully.
Name | Datatype | Description |
---|---|---|
cluster_id | string | |
library_statuses | array |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
clusterstatus | select | deployment_name | Get the status of libraries on a cluster. A status is returned for all libraries installed on this cluster via the API or the libraries UI. The order of returned libraries is as follows: | |
allclusterlibrarystatuses | select | deployment_name | Get the status of all libraries on all clusters. A status is returned for all libraries installed on this cluster via the API or the libraries UI. | |
install | insert | deployment_name | Add libraries to install on a cluster. The installation is asynchronous; it happens in the background after the completion of this request. | |
uninstall | delete | deployment_name | Set libraries to uninstall from a cluster. The libraries won't be uninstalled until the cluster is restarted. A request to uninstall a library that is not currently installed is ignored. |
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
- clusterstatus
- allclusterlibrarystatuses
Get the status of libraries on a cluster. A status is returned for all libraries installed on this cluster via the API or the libraries UI. The order of returned libraries is as follows:
SELECT
cluster_id,
library_statuses
FROM databricks_workspace.compute.libraries
WHERE deployment_name = '{{ deployment_name }}' -- required;
Get the status of all libraries on all clusters. A status is returned for all libraries installed on this cluster via the API or the libraries UI.
SELECT
cluster_id,
library_statuses
FROM databricks_workspace.compute.libraries
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- install
- Manifest
Add libraries to install on a cluster. The installation is asynchronous; it happens in the background after the completion of this request.
INSERT INTO databricks_workspace.compute.libraries (
data__cluster_id,
data__libraries,
deployment_name
)
SELECT
'{{ cluster_id }}',
'{{ libraries }}',
'{{ deployment_name }}'
;
# Description fields are for documentation purposes
- name: libraries
props:
- name: deployment_name
value: string
description: Required parameter for the libraries resource.
- name: cluster_id
value: required
- name: libraries
value: required
DELETE
examples
- uninstall
Set libraries to uninstall from a cluster. The libraries won't be uninstalled until the cluster is restarted. A request to uninstall a library that is not currently installed is ignored.
DELETE FROM databricks_workspace.compute.libraries
WHERE deployment_name = '{{ deployment_name }}' --required;