Prerequisites
- A JDK installation
- The JDBC URL for the Databricks cluster
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:
Environment Variables
Pre-Aggregation Feature Support
count_distinct_approx
Measures of typecount_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).