Chalk supports Databricks as a SQL Source. You can configure the Databricks-specific options using the DatabricksSource.__init__ args. Alternately, you can configure the source through your dashboard.


Integrations Setup

After configuring your Databricks integration in the dashboard, define your data sources in Python:

from chalk.sql import DatabricksSource

risk = DatabricksSource(name="RISK")
marketing = DatabricksSource(name="MARKETING")

Then reference them in SQL file resolvers using the name parameter. For example, to query from the RISK source:

-- type: online
-- resolves: User
-- source: RISK
SELECT id, credit_score FROM users

And to query from the MARKETING source:

-- type: online
-- resolves: User
-- source: MARKETING
SELECT id, email, campaign_status FROM users
Named integrations inject environment variables with the standard names prefixed by the integration name. For example, if your integration is called RISK, then the variable DATABRICKS_HOST will be injected as RISK_DATABRICKS_HOST.