dbt Semantic Layer lets the AI query the governed metrics your team defined in dbt, instead of writing SQL against raw tables.
What you can ask for#
List the metrics and dimensions available in my dbt Semantic Layer.
Show monthly revenue by region for this year as a chart.
Build a KPI card page for active customers and churn.
Connect dbt Semantic Layer#
Step 1: Find the connector
Open Tools, then Connectors, and search for dbt Semantic Layer. You can also go to Settings, then Connectors, in your dashboard.
Step 2: Select Connect
Select Connect to open the secure form.
Step 3: Enter the details
Fill in Service token, Semantic Layer host and Environment ID. Hidden fields show as dots; use the eye icon to check what you typed.
Step 4: Save
Select Save connection. Swarmz encrypts the credentials and only decrypts them to call dbt Semantic Layer for you. Everyone in your workspace can then use the connection.
Where to find your credentials#
In dbt, create a service token that starts with dbtc_ and give it only the permissions it needs. Note your numeric Environment ID. For the host, use one of semantic-layer.cloud.getdbt.com, semantic-layer.emea.dbt.com or semantic-layer.au.dbt.com. Other hosts are refused.
What the AI can and can't do#
- Discover metrics and dimensions.
- Run semantic queries and read the results.
- It cannot run raw SQL or change your dbt project.
- Apps you publish can call this connector too, not just the builder.
- Everything this connector does is a read, so nothing is changed on your side.
Troubleshooting#
The host is rejected.
Use one of the three supported hosts exactly as listed.
No metrics appear.
Check the environment ID and that your token can access that environment.
A query fails.
Ask for fewer dimensions or a shorter date range.
General steps for any connector are in Connect an integration. Keys and secrets are covered in Secrets and API keys. To remove it, see Disconnect an integration.
What Swarmz can do with it
Governed metrics
Discover metrics and their available dimensions.
Metric queries
Start and read bounded asynchronous semantic queries.
More in Data & analytics
Still stuck?
A person from Swarmz Support can take a look.