🧪 Preview (Beta)
Suitable for production read workloads.
Most PostgreSQL driver features are supported; some PostgreSQL features may not yet be tested and could behave differently or not work in some tools.
Suitable for production read workloads.
Most PostgreSQL driver features are supported; some PostgreSQL features may not yet be tested and could behave differently or not work in some tools.

Connect dbt to Firebolt using the PostgreSQL protocol
This guide explains how to connect dbt to Firebolt using the PostgreSQL protocol. Firebolt supports two dbt connection paths:- dbt Cloud using the PostgreSQL adapter
- dbt Core using the PostgreSQL adapter with mutual TLS (mTLS)
Note Firebolt also provides a native dbt adapter, but it is currently limited to Firebolt Core only. This guide focuses on the PostgreSQL protocol, which works for both Cloud and Core.
Overview
When using dbt with Firebolt over the PostgreSQL protocol:- Firebolt is exposed as a PostgreSQL-compatible endpoint
- Authentication is done using service accounts
- Account and engine are provided via the username field
- Username use a triple identifier format:
<account>:<engine>:<service_account_id>
- Username use a triple identifier format:
Prerequisites
Before starting, make sure you have:- dbt Cloud or dbt Core – Depending on your choice, have access to either a dbt Cloud account or a local installation of dbt Core.
- Firebolt account – You need an active Firebolt account. If you do not have one, you can sign up for one.
- Firebolt database and table – You must have access to a Firebolt database that contains a table with data ready for transformation. If you don’t have access, you can create a database and then load data into it.
- Firebolt service account – You must have access to an active Firebolt service account, which facilitates programmatic access to Firebolt, its ID and secret.
- Firebolt user – You must have a user that is associated with your service account. The user should have USAGE permission to query your database, and OPERATE permission to start and stop an engine if it is not already started.
Connect dbt Cloud to Firebolt
ℹ️ Network access requirement
dbt Cloud does not support mutual TLS (mTLS). In most cases, connections work without additional setup.
If you encounter connectivity issues, your dbt Cloud IP address may need to be allowlisted by Firebolt. See Allowlisting dbt Cloud IP Addresses.
dbt Cloud does not support mutual TLS (mTLS). In most cases, connections work without additional setup.
If you encounter connectivity issues, your dbt Cloud IP address may need to be allowlisted by Firebolt. See Allowlisting dbt Cloud IP Addresses.
⚠️ dbt Cloud limitation (important)
dbt Cloud enforces a PostgreSQL-style limit on the username length.When using the new Firebolt PostgreSQL connection model, the full username value:
Firebolt service accounts with a 57-character client ID cannot be used with dbt Cloud.To connect dbt Cloud to Firebolt, you must use a service account with a shorter client ID (26 characters).If the service account you are using has a 57-character client ID, create a new service account with a shorter ID and use it for the connection.Engine name length
If the combined username exceeds 63 characters due to a long engine name, rename the engine to a shorter name for use with dbt Cloud.Note
This limitation is specific to dbt Cloud and PostgreSQL compatibility. It does not apply to dbt Core.
dbt Cloud enforces a PostgreSQL-style limit on the username length.When using the new Firebolt PostgreSQL connection model, the full username value:
<account_name>:<engine_name>:<service_account_id> must be 63 characters or fewer.If this limit is exceeded:- The connection test may succeed
- But the connection cannot be saved in dbt Cloud
- dbt Cloud displays a generic “Something went wrong” error
Firebolt service accounts with a 57-character client ID cannot be used with dbt Cloud.To connect dbt Cloud to Firebolt, you must use a service account with a shorter client ID (26 characters).If the service account you are using has a 57-character client ID, create a new service account with a shorter ID and use it for the connection.Engine name length
If the combined username exceeds 63 characters due to a long engine name, rename the engine to a shorter name for use with dbt Cloud.Note
This limitation is specific to dbt Cloud and PostgreSQL compatibility. It does not apply to dbt Core.
Step 1: Create a PostgreSQL connection
- Go to Settings → Connections
- Click New connection
- Select PostgreSQL
-
Fill in the required fields:
- Connection name: Any descriptive name (for example:
Firebolt PostgreSQL) - Server hostname:
pg.<region>.app.firebolt.io- Replace
<region>with your Firebolt account region (for example:us-east-1)
- Replace
- Port:
5432
- Connection name: Any descriptive name (for example:
-
Expand Optional settings and set:
- Database name:
<database_name>- Replace the placeholders with your account’s information:
- Database name:
- Click Save.
Step 2: Create a dbt Cloud project
- Go to Projects
- Click + New project
- Enter a Project name
- Continue to Configure your development environment
Configure development credentials
When setting up the project, dbt Cloud will request development credentials. Firebolt requires service account credentials. Fill the fields as follows:- Connection: Select the PostgreSQL connection created earlier
- Username:
<account_name>:<engine_name>:<service_account_client_id> - Password:
<service_account_client_secret>- Replace the placeholders with your service account’s information:
<account_name>: Your Firebolt account name<engine_name>: Your Firebolt engine name<service_account_client_id>: Client ID of your service account<service_account_client_secret>: Client secret of your service account
- Replace the placeholders with your service account’s information:
Allowlisting dbt Cloud IP Addresses
dbt Cloud does not support mutual TLS (mTLS). If you experience connectivity issues when connecting dbt Cloud to Firebolt, your dbt Cloud IP address may need to be allowlisted by Firebolt.Get your dbt Cloud IP address
dbt Cloud displays the outbound IP addresses directly in the PostgreSQL connection setup screen.- While creating or editing the PostgreSQL connection in dbt Cloud, scroll to the Settings section
- Locate the message indicating the IP addresses dbt Cloud will connect from.
- Copy all IP addresses listed in that message
Request allowlisting
Contact Firebolt Support and request to allowlist the ThoughtSpot IP address for your account. See more about how to contact Firebolt Support and the severity guidelines. Include the following information in your request:- Your name and email address
- Your organization name
- Name of the tool you want to connect (dbt Cloud in this case)
- The dbt Cloud IPs addresses to allowlist
Connect dbt Core to Firebolt (mTLS)
dbt Core connects to Firebolt using:- PostgreSQL adapter
- Service account credentials
- Mutual TLS (mTLS)
- Full server certificate verification (verify-full)
Step 1: Generate certificates (client cert + Let’s Encrypt root)
Run the following script to generate all certificates required by dbt Core and Firebolt. This script:- Generates a client private key and certificate
- Downloads the Let’s Encrypt root CA used by Firebolt servers
- Derives a public key to attach to the Firebolt service account
Step 2: Configure the Firebolt service account
Create or update a service account with the generated public key:Step 3: Configure profiles.yml
Example profiles.yml for dbt Core:<region>: Your Firebolt region (for example:us-east-1)<service_account_client_id>: Client ID of your service account<service_account_client_secret>: Client secret of your service account<account_name>: Your Firebolt account name<database_name>: Your Firebolt database name<engine_name>: Your Firebolt engine name<path>: Path to the directory where the certificates were generated
Troubleshooting, known limitations and workarounds
This section lists known limitations when using Firebolt with dbt via the PostgreSQL protocol, along with recommended workarounds. These limitations apply to both dbt Cloud and dbt Core when using the PostgreSQL adapter.Dependent views and model rebuild failures
Firebolt does not allow altering or replacing tables that have dependent views. In dbt, this can cause failures during:dbt rundbt builddbt run --full-refresh
- references to dependent views
- failures to ALTER TABLE or RENAME objects
- messages indicating the object does not exist, even though dbt expects it to
Why this happens
dbt commonly rebuilds models using the following pattern:- Create a temporary relation (
__dbt_tmp) - Rename the existing relation to a backup (
__dbt_backup) - Rename the temporary relation to the target name
DROP VIEW) in hooks is unsafe.
Why?
- dbt maintains an internal relation cache
- Executing raw SQL does not update dbt’s cache
- dbt may still think the view exists and attempt to rename it
- This leads to flaky behavior (for example: every second run fails)
Recommended workaround (safe and stable)
Use an adapter-aware macro to drop dependent views. This ensures dbt updates its internal cache correctly.1. Define a helper macro
Create the following macro (for example:macros/firebolt_drop_view.sql):
- Checks whether the view exists
- Drops it using dbt’s adapter API
- Keeps dbt’s internal state consistent
1. Call the macro from a model pre-hook
Apply the pre-hook to the model that owns the base table (for example, orders). Using model config in SQL:dependent_view_name with the actual name of the view that depends on this table.
Note and limitations
- Do not use raw DROP VIEW statements in hooks
- Avoid recreating views manually inside hooks, as this can introduce cycles
- The drop must run on the upstream table model, not on the view itself
Additional resources
For more information about dbt Core and PostgreSQL-based integrations, see the official dbt documentation:- dbt documentation home
- Introduction to dbt
- Installing dbt Core
- Connecting dbt to PostgreSQL
- Configuring profiles.yml
- Building models in dbt
- dbt materializations
- Hooks in dbt (pre-hook and post-hook)