> For the complete documentation index, see [llms.txt](https://documentation.immuta.com/SaaS/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.immuta.com/SaaS/configuration/integrations/databricks/databricks-spark/how-to-guides/installation.md).

# Install a Trusted Library

1. In the Databricks Clusters UI, install your third-party library .jar or Maven artifact with **Library Source** `Upload`, `DBFS`, `DBFS/S3`, or `Maven`. Alternatively, use the Databricks libraries API.
2. In the Databricks Clusters UI, add the `IMMUTA_SPARK_DATABRICKS_TRUSTED_LIB_URIS` property as a Spark environment variable and set it to your artifact's URI. To specify more than one trusted library, comma delimit the URIs:

   ```bash
   IMMUTA_SPARK_DATABRICKS_TRUSTED_LIB_URIS=maven:/my.group.id:my-package-id:1.2.3
   ```

{% tabs %}
{% tab title="Maven artifacts" %}
For Maven artifacts, the URI is `maven:/<maven_coordinates>`, where `<maven_coordinates>` is the **Coordinates** field found when clicking on the installed artifact on the **Libraries** tab in the Databricks Clusters UI. Here's an example of an installed artifact:

<figure><img src="/files/SmRPCJPPAVV188FvBsF9" alt="The coordinate field includes the following Maven coordinate: com.github.immuta.hadoop.immuta-spark-third-party-maven-lib-test:2020-11-17-144644."><figcaption></figcaption></figure>

In this example, you would add the following Spark environment variable:

```bash
IMMUTA_SPARK_DATABRICKS_TRUSTED_LIB_URIS=maven:/com.github.immuta.hadoop.immuta-spark-third-party-maven-lib-test:2020-11-17-144644
```

{% endtab %}

{% tab title=".jar artifacts" %}
For jar artifacts, the URI is the **Source** field found when clicking on the installed artifact on the **Libraries** tab in the Databricks Clusters UI. For artifacts installed from DBFS or S3, this ends up being the original URI to your artifact. For uploaded artifacts, Databricks will rename your .jar and put it in a directory in DBFS. Here's an example of an installed artifact:

<figure><img src="/files/vsh7N0yvrh91V02dbp1Z" alt="The source field includes the following URI: dbfs:/immuta/bstabile/jars/immuta-spark-third-party-lib-test.jar."><figcaption></figcaption></figure>

In this example, you would add the following Spark environment variable:

```bash
IMMUTA_SPARK_DATABRICKS_TRUSTED_LIB_URIS=dbfs:/immuta/bstabile/jars/immuta-spark-third-party-lib-test.jar
```

{% endtab %}
{% endtabs %}

3. Once you've finished making your changes, restart the cluster.
4. Once the cluster is up, execute a command in a notebook. If the trusted library installation is successful, you should see driver log messages like this:

   <pre><code><strong>TrustedLibraryUtils: Successfully found all configured Immuta configured trusted libraries in Databricks.
   </strong>TrustedLibraryUtils: Wrote trusted libs file to [/databricks/immuta/immutaTrustedLibs.json]: true.
   TrustedLibraryUtils: Added trusted libs file with 1 entries to spark context.
   TrustedLibraryUtils: Trusted library installation complete.
   </code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.immuta.com/SaaS/configuration/integrations/databricks/databricks-spark/how-to-guides/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
