🧪 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.

Hex integration with Firebolt
Hex is a modern analytics and BI platform that combines SQL, notebooks, dashboards, and AI-powered data exploration. Hex allows teams to explore data, build dashboards, and ask natural-language questions that are automatically translated into SQL queries. This guide explains how to connect Hex to Firebolt using the PostgreSQL protocol with mutual TLS (mTLS) authentication.Overview
Hex connects to Firebolt through the PostgreSQL-compatible endpoint exposed by Firebolt. Key characteristics of this integration:- Hex uses the PostgreSQL protocol
- Authentication is done using Firebolt service accounts
- Connections use mutual TLS (mTLS)
- 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:
- Hex executes SQL directly against Firebolt
- Dashboards, SQL exploration, and Hex AI are supported
- Tables should be located in the
publicschema
Prerequisites
Before starting, make sure you have:-
Hex
- Hex Cloud workspace
- Admin access to configure data connections
-
Firebolt account
- With access to a database and engine
-
Firebolt service account
- Client ID and client secret
- A user associated with the service account
- Permissions
Authentication and security
Hex connects to Firebolt using:- PostgreSQL protocol
- Firebolt service account credentials
- Mutual TLS (mTLS)
- Encrypted connections
- Strong client authentication
- Compatibility with standard PostgreSQL drivers used by Hex
Generate mTLS certificates for Hex
Step 1: Generate certificates
Run the following script to generate the certificates required by Hex and Firebolt. This script:- Generates a client certificate and private key
- 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
Attach the generated public key to your Firebolt service account:Connect Hex to Firebolt
Step 1: Create a data connection in Hex
- Open Hex
- Go to Settings → Data sources
- Click + Connection
- Select PostgreSQL
Step 2: Configure the PostgreSQL connection
Fill in the connection form as follows. Name A friendly name, for example:Firebolt
Host & port
- Host:
pg.<region>.app.firebolt.io- Replace
<region>with your Firebolt region (for example:us-east-1)
- Replace
- Port:
5432
<database_name>
Step 3: Authentication (mTLS)
Authentication settings
Type: Select Certificate Username:<account_name>:<engine_name>:<service_account_client_id>
Where:
<account_name>is your Firebolt account name<engine_name>is your Firebolt engine name<service_account_client_id>is the client ID of your Firebolt service account
<service_account_client_secret>
TLS configuration
Paste the values generated by the certificate script:-
SSL certificate
Paste the contents of
fb-client.crt -
SSL root certificate
Paste the contents of
isrgrootx1.pem -
SSL key
Paste the contents of
fb-client.key - SSL password Leave empty (the private key is not encrypted)
Test and use the connection
- Click Create connection
- Hex will automatically test the connection
- Once the test succeeds, the connection is ready to use
- Run SQL queries directly against Firebolt
- Build SQL-based charts and dashboards
- Create UI dashboards on top of saved queries
- Use Hex AI to ask natural-language questions such as:
- “What is the city with the most orders?”
- “What is the average number of order items per order?”
Known limitations and workarounds
Hex provides a rich UI for building calculated fields, measures, and formulas on top of connected data sources. However, not all Hex-generated calculation formulas are currently supported by Firebolt’s PostgreSQL-compatible SQL dialect. Because Hex dynamically generates SQL for these calculations, some functions may fail at query execution time even though the connection itself is working correctly.Calculation functions that may not work
Based on current testing, the following categories of Hex calculation formulas are not fully supported:Date & time calculations
Diff*functions (for example: DiffHours, DiffMinutes, DiffSeconds)Second()andMillisecond()extraction- Some
Trunc*functions on older Firebolt versions (for example, Firebolt 4.29)- These work correctly on newer versions (for example, 4.31)
String functions
Left()Right()StartsWith()EndsWith()(may be generated usingRIGHT()internally)
⚠️ This list is not guaranteed to be exhaustive. Hex may generate additional SQL expressions depending on the UI feature used.
Recommended workaround
If a calculation or formula does not work in Hex UI: 👉 Write plain SQL instead of using the Hex formula builder Hex allows you to:- Write raw SQL queries
- Build charts and dashboards on top of SQL results
- Use Firebolt-supported SQL functions directly