Databricks Lakebase setup
- Maintained by: dbt Labs
- Authors: dbt Labs
- GitHub repo: dbt-labs/dbt-adapters
- PyPI package:
dbt-postgres
- Slack channel: #db-postgres
- Supported dbt Core version: v1.0.0 and newer
- dbt support: Supported
- Minimum data platform version: ?
Installing dbt-postgres
Use pip
to install the adapter. Before 1.8, installing the adapter would automatically install dbt-core
and any additional dependencies. Beginning in 1.8, installing an adapter does not automatically install dbt-core
. This is because adapters and dbt Core versions have been decoupled from each other so we no longer want to overwrite existing dbt-core installations.
Use the following command for installation:
python -m pip install dbt-core dbt-postgres
Configuring dbt-postgres
For Lakebase-specific configuration, please refer to Lakebase configs.
Profile Configuration
Databricks Lakebase targets are configured exactly the same as Postgres targets.
Use these key parameters to connect to Databricks Lakebase:
host name
: Found in Databricks > Compute > Database instances > Connect with PSQL using the formatinstance-123abcdef456.database.cloud.databricks.com
database name
: Usedatabricks_postgres
by default- Authentication: dbt-postgres only supports username/password. You can generate a username/password by enabling Native Postgres Role Login and use the role name as the username. To learn more about managing the Postgres roles and privileges, check out the docs.
Alternatively you can generate an OAuth token that will need to be refreshed every hour to use with your Databricks username.
0