Connect to Preset

Preset provides modern business intelligence for your entire organization. Preset provides a powerful, easy to use data exploration and visualization platform, powered by open source Apache Superset.

You can integrate your Databricks SQL warehouses (formerly Databricks SQL endpoints) and Databricks clusters with Preset.

Connect to Preset manually

In this section, you connect an existing SQL warehouse or cluster in your Databricks workspace to Preset.

Requirements

Before you integrate with Preset manually, you must have the following:

Steps to connect

To connect to Preset manually, do the following:

  1. Create a new Preset account, or sign in to your existing Preset account.

  2. Click + Workspace.

  3. In the Add New Workspace dialog, enter a name for the workspace, select the workspace region that is nearest to you, and then click Save.

  4. Open the workspace by clicking the workspace tile.

  5. On the toolbar, click Catalog > Databases.

  6. Click + Database.

  7. In the Connect a database dialog, in the Supported Databases list, select one of the following:

    • For a SQL warehouse, select Databricks SQL Warehouse.

    • For a cluster, select Databricks Interactive Cluster.

  8. For SQLAlchemy URI, enter the following value:

    For a SQL warehouse:

    databricks+pyodbc://token:{access token}@{server hostname}:{port}/{database name}
    

    For a cluster:

    databricks+pyhive://token:{access token}@{server hostname}:{port}/{database name}
    

    Replace:

    • {access token} with the Databricks personal access token value from the requirements.

    • {server hostname} with the Server Hostname value from the requirements.

    • {port} with the Port value from the requirements.

    • {database name} with the name of the target database in your Databricks workspace.

    For example, for a SQL warehouse:

    databricks+pyodbc://token:dapi...@dbc-a1b2345c-d6e7.cloud.databricks.com:443/default
    

    For example, for a cluster:

    databricks+pyhive://token:dapi...@dbc-a1b2345c-d6e7.cloud.databricks.com:443/default
    
  9. Click the Advanced tab, and expand Other.

  10. For Engine Parameters, enter the following value:

    For a SQL warehouse:

    {"connect_args": {"http_path": "sql/1.0/warehouses/****", "driver_path": "/opt/simba/spark/lib/64/libsparkodbc_sb64.so"}}
    

    For a cluster:

    {"connect_args": {"http_path": "sql/protocolv1/o/****"}}
    

    Replace sql/1.0/warehouses/**** or sql/protocolv1/o/**** with the HTTP Path value from the requirements.

    For example, for a SQL warehouse:

    {"connect_args": {"http_path": "sql/1.0/warehouses/ab12345cd678e901", "driver_path": "/opt/simba/spark/lib/64/libsparkodbc_sb64.so"}}
    

    For example, for a cluster:

    {"connect_args": {"http_path": "sql/protocolv1/o/1234567890123456/1234-567890-buyer123"}}
    
  11. Click the Basic tab, and then click Test Connection.

    Note

    For connection troubleshooting, see Database Connection Walkthrough for Databricks on the Preset website.

  12. After the connection succeeds, click Connect.