The Simplest Way to Make Compass and dbt Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use compass and dbt together to map data models to software catalogs. This link lets engineers see who owns each pipeline and when jobs fail. Data teams build clean tables while software teams track health in one catalog. Clear ownership stops finger pointing when a nightly build breaks in production. How compass and dbt share data and roles Data flows between the two tools through webhooks and API calls. When a transform run finishes, the pipeline sends status updates to the catalog. T

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams use compass and dbt together to map data models to software catalogs. This link lets engineers see who owns each pipeline and when jobs fail. Data teams build clean tables while software teams track health in one catalog. Clear ownership stops finger pointing when a nightly build breaks in production.

How compass and dbt share data and roles

Data flows between the two tools through webhooks and API calls. When a transform run finishes, the pipeline sends status updates to the catalog. The catalog reads these updates and maps them to the right component page. Engineers then check build health right next to their app metrics.

To make this work, you must set up keys in both systems. The transform tool needs an API key that can write to the catalog. The catalog needs a role that can read job history and model metadata. Keep these two roles separate so each tool only does its own job.

Under the hood, the transform engine still logs into your main data warehouse. It reads raw tables, runs SQL models, and writes new tables for reports. If a warehouse query includes sensitive data, masking rewrites matched fields in results. For example, masking can replace emails, phone numbers, card numbers, or national IDs. Meanwhile, the catalog only receives status logs and model names, not raw rows.

Common failure modes in your setup

Many teams take shortcuts when they first link their data and catalog tools. They often use one shared admin account for all pipeline runs and updates. When a bad query wipes a table, the logs only show that shared user. No one knows which engineer or scheduled job actually triggered the bad run.

Broad API tokens create another big risk for your production stack. If a token has full admin rights, a leaked key exposes every project. Attackers could alter catalog records or trigger expensive warehouse runs at any time. Static keys also sit in config files for months without anyone rotating them.

Unlogged queries make it even harder to fix broken data pipelines. Sometimes an engineer logs into the warehouse by hand to fix a model. That manual change bypasses version control and leaves the catalog out of sync. The next scheduled run fails because the table schema changed without a log.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to scope roles and network paths

Start by giving each job and service its own narrow role. The catalog sync worker should only have permission to update component health metrics. Your transform runner should only read source schemas and write to target schemas. Never let a sync script hold admin rights over your warehouse tables.

Next, lock down the network paths between your runners and your data stores. Put your job runners in a private subnet with strict outbound rules. Only allow traffic to the specific ports that your warehouse and catalog use. Block public internet access to your database endpoints whenever you can.

Finally, tie every manual check and pipeline change back to a real person. Require engineers to log in with their own team identity before running fixes. Store your API keys in a secure secret store and rotate them often. When every query carries a clear user tag, audits become fast and simple.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Does the catalog store raw data from my warehouse models?

No, the catalog only stores metadata like model names, owners, and run status. Your raw tables and sensitive rows stay inside your data warehouse.

How often should we rotate the API keys between these tools?

You should rotate service keys at least once every ninety days. Short-lived keys reduce the risk if a config file ever leaks.

How do we stop manual database edits from breaking dbt models?

Remove direct write permissions from human accounts in your production warehouse schemas. Force all schema changes to go through version control and automated job runs.

The query runs. The emails stay hidden.