> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sync.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Databricks

export const CommonDatasourceAuthenticate = () => {
  return <p>After you add the connector, you need to set the required properties.</p>;
};

export const CommonDatasourceCompleteConnectionOauth = ({datasource = "the data source", title = "the connector", oauthschemes = "", start = 2}) => {
  return <ol start={start}>
      <li>Define advanced connection settings on the <strong>Advanced</strong> tab. (In most cases, though, you should not need these settings.)</li>
      <li>{oauthschemes ? <>If you authenticate with {oauthschemes}, click</> : <>Click</>} <strong>Connect to {datasource}</strong> to connect to your {title} account.</li>
      <li>Click <strong>Create & Test</strong> to create your connection.</li>
    </ol>;
};

export const CommonDatasourceMoreInformation = ({datasource = "the data source", advancedurl = "", siteName = "CData Sync", driverVersion = ""}) => {
  return <>
      <p>
        For more information about interactions between {siteName} and {datasource}, see{' '}
        <a href={`https://cdn.cdata.com/help/${advancedurl}${driverVersion}/synch/default.htm`}>
          {datasource} Connector for {siteName}
        </a>.
      </p>
    </>;
};

export const CommonDatasourceAddConnector = ({datasource = "the data source", title = "the connector", destination = false, siteNameShort = "Sync"}) => {
  return <>
      <p>
        To enable {siteNameShort} to use data from {datasource}, you first must add the
        connector, as follows:
      </p>
      <ol>
        <li>Open the <strong>Connections</strong> page of the {siteNameShort} dashboard.</li>
        <li>Click <strong>Add Connection</strong> to open the <strong>Select Connectors</strong> page.</li>
        <li>
          Click the <strong>{destination ? "Destinations" : "Sources"}</strong> tab and locate
          the <strong>{title}</strong> row.
        </li>
        <li>
          Click the <strong>Configure Connection</strong> icon at the end of that row to open
          the <strong>New Connection</strong> page. This action opens the{' '}
          <strong>Add Connection</strong> dialog box.
          <br />
          <strong>Note:</strong> If the <strong>Configure Connection</strong> icon is not
          available, click the <strong>Download Connector</strong> icon to install
          the {title} connector.
        </li>
        <li>Enter a name for your connection in the <strong>Add Connection</strong> dialog box.</li>
        <li>Click <strong>Add</strong> to open the <strong>Settings</strong> tab for your connector.</li>
      </ol>
      <p>
        For more information about installing new connectors, see{' '}
        <a href="../connections">Connections</a>.
      </p>
    </>;
};

export const CommonDatasourceIntroDestination = ({datasource = "the data source", siteName = "CData Sync"}) => {
  return <p>
      You can use the {datasource} connector from the {siteName} application to move data
      from any supported source to the {datasource} destination. To do so, you need to add
      the connector, authenticate to the connector, and complete your connection.
    </p>;
};

export const driverVersion = "M";

export const siteNameShort = "Sync";

export const siteName = "CData Sync";

export const datasource = "Databricks";
export const pageTitle = "Databricks";
export const advancedurl = "";
export const oauthschemes = "AzureAD";

<CommonDatasourceIntroDestination datasource="Databricks" siteName={siteName} />

## Supported Databricks Features

<p>The {datasource} destination in {siteNameShort} supports the following features, enabling you to integrate with modern {datasource} environments:</p>

<ul>
  <li><a href="https://www.databricks.com/product/unity-catalog" target="_blank" rel="noopener noreferrer">Unity Catalog</a>, which provides centralized governance for {datasource} data assets, including catalogs, schemas, and tables</li>
  <li><a href="https://docs.databricks.com/aws/en/delta" target="_blank" rel="noopener noreferrer">Delta Lake</a>, which provides reliable, high-performance storage for analytics workloads</li>
  <li><a href="https://docs.databricks.com/aws/en/tables/managed" target="_blank" rel="noopener noreferrer">Delta tables</a>, which store data in the Delta Lake format and can be managed through Unity Catalog</li>
</ul>

<Note>When you load data into Delta tables, {siteNameShort} uses the {datasource} COPY INTO command to load staged data efficiently by using native {datasource} functionality. For more details, see <a href="https://docs.databricks.com/en/ingestion/copy-into/index.html" target="_blank" rel="noopener noreferrer">Get started using COPY INTO to load data</a> on the Databricks website.</Note>

## Add the Databricks Connector

<CommonDatasourceAddConnector datasource="Databricks" title="Databricks" destination={true} siteNameShort={siteNameShort} />

## Authenticate to Databricks

<CommonDatasourceAuthenticate datasource="Databricks" title="Databricks" destination={true} siteNameShort={siteNameShort} />

* **Server:** Enter the host name or the IP address of the server that hosts the Databricks database.
* **HTTP Path:** Enter the HTTP path of your Databricks cluster.
* **Catalog:** Enter the name of your catalog. The default catalog name is **hive\_metastore**.

{siteName} supports authenticating to Databricks in several ways. Select your authentication method below to proceed to the relevant section that contains the authentication details.

* [**Personal Access Token**](#personal-access-token) (default)
* [**Basic**](#basic)
* [**User-to-Machine Authentication**](#user-to-machine-authentication)
* [**Machine-to-Machine Authentication**](#machine-to-machine-authentication)
* [**Azure Service Principal**](#azure-service-principal)
* [**Azure Active Directory**](#azure-active-directory)

### Personal Access Token

To connect with a personal access token (PAT), set the following properties:

* **Auth Scheme:** Select **PersonalAccessToken**.
* **Token:** Enter the PAT that you use to connect to Databricks server.

  To obtain your token:

  1. In your Azure Databricks workspace, click your username in the top bar and select **User Settings > Access Tokens**.
  2. Click **Developer**.
  3. Click **Manage** (next to **Access tokens**). Then, click **Generate new token > Generate**.

  Copy and save your new token because it will not be displayed again.

### Basic

To connect with your user credentials, set the following properties:

* **Auth Scheme:** Select **Basic**.
* **User:** Enter the username that you use to authenticate to your Databricks account.
* **Token:** Enter the token that you use to authenticate to your Databricks account.

### User-to-Machine Authentication

User-to-machine (U2M) authentication enables you to grant tools or applications (for example, a command-line interface) access to your workspace. To authenticate via with this method, set the following properties:

* **Auth Scheme:** Select **OAuthU2M**.
* **OAuth Level:** Select the level from which you want to generate an access token.
  * **AccountLevel:** A Databricks account represents a single entity that can include multiple workspaces. You can use accounts that are enabled for Unity Catalog to manage users and their access to data centrally across all of the workspaces in the account.

    For this level, you need to enter your account identifier (Id) in the **Databricks Account Id** text box.

  * **WorkspaceLevel (default):** In Databricks, a workspace is a Databricks deployment in the cloud that functions as an environment for your team to access Databricks assets.

    No other settings are necessary for this level.

### Machine-to-Machine Authentication

Machine-to-machine (M2M) authentication verifies the identity of devices or applications that communicate over a network. To authenticate with this method, set the following properties:

* **Auth Scheme:** Select **OAuthM2M**.
* **OAuth Client Id:** Enter the client Id that you were assigned when you registered your application with an OAuth authorization server.
* **OAuth Client Secret:** Enter the client secret that you were assigned when you registered your application with an OAuth authorization server.
* **OAuth Level:** Select the level from which you want to generate an access token.
  * **AccountLevel:** A Databricks account represents a single entity that can include multiple workspaces. You can use accounts that are enabled for Unity Catalog to manage users and their access to data centrally across all of the workspaces in the account.

    For this level, you need to enter your account Id in the **Databricks Account Id** text box.

  * **WorkspaceLevel (default):** In Databricks, a workspace is a Databricks deployment in the cloud that functions as an environment for your team to access Databricks assets.

    No other settings are necessary for this level.

### Azure Service Principal

To connect with an Azure service principal, set the following properties:

* **Auth Scheme:** Select **AzureServicePrincipal**.
* **Azure Tenant Id:** Enter the tenant Id for your Microsoft Azure Active Directory application.
* **Azure Client Id:** Enter the client Id for your Microsoft Azure Active Directory application.
* **Azure Client Secret:** Enter the client secret for your Microsoft Azure Active Directory application.

### Azure Active Directory

To connect with an Azure Active Directory user account, set the following properties:

* **Auth Scheme:** Select **AzureAD**.
* **Azure Tenant:** Enter the Microsoft Online tenant that you use to access data. If you do not specify a tenant, {siteNameShort} uses the default tenant.
* **OAuth Client Id:** Enter the client Id that you were assigned when you registered your application with an OAuth authorization server.

## Complete Your Connection

To complete your connection:

1. (Optional) For **Database**, enter the name of your Databricks database.

<div style={{marginTop: "-1rem"}}>
  <CommonDatasourceCompleteConnectionOauth datasource={datasource} title={pageTitle} oauthschemes={oauthschemes} />
</div>

## More Information

<CommonDatasourceMoreInformation datasource="Databricks" advancedurl="LK" siteName={siteName} driverVersion={driverVersion} />
