Skip to main content
Databricks is a unified data intelligence platform.

Prerequisites

Setup

Environment Variables

Add the following to a .env file in your Cube project:

Docker

Create a .env file as above, then extend the cubejs/cube:jdk Docker image tag to build a Cube image with the JDBC driver:
You can then build and run the image using the following commands:

Environment Variables

Pre-Aggregation Feature Support

count_distinct_approx

Measures of type count_distinct_approx can be used in pre-aggregations when using Databricks as a source database. To learn more about Databricks’s support for approximate aggregate functions, click here.

Pre-Aggregation Build Strategies

To learn more about pre-aggregation build strategies, head here.
By default, Databricks JDBC uses a simple strategy to build pre-aggregations.

Simple

No extra configuration is required to configure simple pre-aggregation builds for Databricks.

Export Bucket

Databricks supports using both AWS S3 and Azure Blob Storage for export bucket functionality.

AWS S3

To use AWS S3 as an export bucket, first complete the Databricks guide on connecting to cloud object storage using Unity Catalog.
Ensure the AWS credentials are correctly configured in IAM to allow reads and writes to the export bucket in S3.

Google Cloud Storage

When using an export bucket, remember to assign the Storage Object Admin role to your Google Cloud credentials (CUBEJS_DB_EXPORT_GCS_CREDENTIALS).
To use Google Cloud Storage as an export bucket, first complete the Databricks guide on connecting to cloud object storage using Unity Catalog.

Azure Blob Storage

To use Azure Blob Storage as an export bucket, follow the Databricks guide on connecting to Azure Data Lake Storage Gen2 and Blob Storage. Retrieve the storage account access key from your Azure account and use as follows:
Access key provides full access to the configuration and data, to use a fine-grained control over access to storage resources, follow the Databricks guide on authorize with Azure Active Directory. Create the service principal and replace the access key as follows:

SSL/TLS

Cube does not require any additional configuration to enable SSL/TLS for Databricks JDBC connections.

Additional Configuration

Cube Cloud

To accurately show partition sizes in the Cube Cloud APM, an export bucket must be configured.