Libraries CLI

Note

The CLI feature is unavailable on Databricks on Google Cloud as of this release.

You run Databricks libraries CLI subcommands by appending them to databricks libraries.

databricks libraries -h

List the status of all libraries on all clusters

To display usage documentation, run databricks libraries all-cluster-statuses --help.

databricks libraries all-cluster-statuses
{
  "statuses": [
    {
      "cluster_id": "1234-567890-lest123",
      "library_statuses": [
        {
          "library": {
            "jar": "dbfs:/FileStore/jars/bbf81650_a62b_4b7a_b47e_7bdd9505792a-SparkJDBC42.jar"
          },
          "status": "INSTALLED",
          "is_library_for_all_clusters": true
        },
        ...
      ]
    },
    ...
  ]
}

List the status of all libraries on a cluster

To display usage documentation, run databricks libraries cluster-status --help or databricks libraries list --help.

databricks libraries cluster-status --cluster-id 1234-567890-lest123

Or:

databricks libraries list --cluster-id 1234-567890-lest123
{
  "cluster_id": "1234-567890-lest123",
  "library_statuses": [
    {
      "library": {
        "jar": "dbfs:/FileStore/jars/bbf81650_a62b_4b7a_b47e_7bdd9505792a-SparkJDBC42.jar"
      },
      "status": "INSTALLED",
      "is_library_for_all_clusters": false
    },
    ...
  ]
}

Install a library on a cluster

To display usage documentation, run databricks libraries install --help.

databricks libraries install --cluster-id 1234-567890-lest123 --jar dbfs:/test-dir/test.jar

If successful, no output is displayed.

Uninstall a library from a cluster

To display usage documentation, run databricks libraries uninstall --help.

databricks libraries uninstall --cluster-id 1234-567890-lest123 --jar dbfs:/test-dir/test.jar
WARNING: Uninstalling libraries requires a cluster restart.
databricks clusters restart --cluster-id 1234-567890-lest123