Custom JDBC Configs - Databricks Example
Overview
Starting from QueryPie ACP 11.6.0, the Custom JDBC Configs feature allows administrators to register a JDBC Driver and create a Databricks connection with policies applied.
The query parser (QSI) supported by QueryPie ACP for Databricks is ANSI query, so Databricks-specific syntax may not work correctly.
This feature is provided as Beta.
To use it, you must set the Custom JDBC Configuration option to Enable in the Experimental section on the Admin > Databases > General > Configurations page.
After activation, the Admin > Databases > Connection Management > Custom JDBC Configs menu will appear.
Registering Databricks as a Custom JDBC Vendor
- Navigate to
Admin > Databases > Connection Management > Custom JDBC Configs. - Click the
Create Custom JDBCbutton in the upper right corner. - Enter an identifiable name in the Name field. This name will be displayed in the Custom JDBC Vendors section when creating a DB connection.
- Enter any additional information in the Description field.
- Enter the Databricks driver class in the
Driver Classfield of the JDBC Configuration section. (For Databricks:com.databricks.client.jdbc.Driver)
In general, the Driver Class can be verified with the following command:
unzip -p <your-driver.jar> META-INF/services/java.sql.Driver- Enter
jdbc:databricks://{host}:{port}/defaultin the JDBC URL Template. - Enter
/in the Options Prefix. - Enter
443in the Default Port. - Enter
--add-opens=java.base/java.nio=ALL-UNNAMEDin the JVM Arguments. - Click the
Select JAR file to uploadbutton in the Driver JAR File section and upload the JDBC Driver.
Databricks: JDBC Driver Download - Click the
Savebutton to save the configuration.
Creating a Databricks Connection with a Custom Vendor
- Navigate to
Admin > Databases > Connection Management > DB Connections. - Click the
Create Connectionbutton in the upper right corner. - Scroll down and select the Databricks entry you registered earlier (the item entered as
Namewhen creating the Custom JDBC) from the Custom JDBC Vendors section. - Enter the connection information such as Connection Name, Host, Port, etc.
- Host: Copy and paste the server hostname value obtained from Databricks.
- Port: Use the default value of 443 specified in the Custom Vendor.
- Database Name: Leave it empty or enter the name corresponding to a Databricks Catalog (refer to the Structure Mapping Comparison table below). Leaving it empty is recommended since this specifies the default path.
- Username: Since Databricks uses tokens, leave the Username empty.
- Password: Enter the token value issued from Settings (User Settings) > Developer > Access tokens in the Databricks console. When generating the token, specify the token scope as sql, workspace, catalog.
- Other Options: Copy and paste the portion after default; from the JDBC URL field found in the connection details of the Databricks console.
- Select a QSI Parser if needed. Select the default
ANSI SQL. - Click the
Nextbutton to proceed to the connection creation complete screen.
Structure Mapping Comparison
| Databricks | QueryPie ACP |
|---|---|
| Catalog | Database |
| Schema | Schema |
| Table | Table |
| Column | Column |
Only Custom JDBC Vendors with Active status are displayed in the Custom JDBC Vendors section.
Last updated on