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

Published
Length
3 min read

Luis Felipe Dias

All posts

You pair redash and dbt by letting dbt build clean tables that Redash reads for charts. This setup turns raw data into trusted dashboards for your whole team. Data teams often struggle when report queries break after a model change. When you link these two tools well, analysts only query clean tables. Engineers transform data in one place, and business users read fast charts. How data and roles flow between redash and dbt These two tools do not talk to each other directly. Instead, they both

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.

You pair redash and dbt by letting dbt build clean tables that Redash reads for charts. This setup turns raw data into trusted dashboards for your whole team.

Data teams often struggle when report queries break after a model change. When you link these two tools well, analysts only query clean tables. Engineers transform data in one place, and business users read fast charts.

How data and roles flow between redash and dbt

These two tools do not talk to each other directly. Instead, they both meet inside your central data warehouse. First, dbt connects to the database using a write role. It reads raw data, runs SQL models, and writes clean tables into reporting schemas.

Next, Redash logs in to that same database using a read role. Analysts write queries in Redash against the final schemas that dbt built. Redash pulls the clean results and draws charts for the team.

You can also sync metadata between the two tools. Teams often push model descriptions and test results from dbt into Redash. This helps analysts see which tables are fresh and ready for use.

Common failure modes and how to scope roles

The biggest mistake teams make is sharing one database user for both tools. If Redash uses the dbt write role, any chart user can drop production tables. A bad query in a dashboard can lock up the whole warehouse.

Another common issue occurs when analysts query staging tables by mistake. When dbt rebuilds those staging models, the Redash dashboards break right away. Unlogged queries from shared service accounts also make audits very hard. If ten analysts share one login, you cannot tell who ran a slow query.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix this, give each tool its own strict database role. Grant the dbt user write permissions only on transform and reporting schemas. Give the Redash user read-only permissions on the final reporting schema alone. Block Redash from reading raw or staging tables at the database level.

Keeping sensitive fields safe in dashboard queries

Even clean reporting tables can hold private user data. Analysts often need to count users without reading private details. If a table holds emails, phone numbers, card numbers, or national IDs, be careful.

Do not rely on chart filters to hide private columns. Anyone with query rights in Redash can still select the whole table. Instead, apply data masking rules or remove those columns during the dbt build step. Masking rewrites matched fields in results before they reach the chart screen. This keeps your audit logs clean and protects customer privacy.

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

Should Redash query dbt staging models?

No, Redash should only read final mart or reporting tables. Staging models change often and will break your saved queries and charts.

How do we update Redash charts when dbt finishes a run?

You can trigger a Redash query refresh after your dbt job ends. Most teams use their job scheduler to call the Redash refresh endpoint.

What database permissions should the Redash user have?

Give the Redash database user read-only permissions on your final reporting schema. Never grant it write access or read access to raw data tables.

Teams that document these role rules and review logs each month catch config drift early. Clear ownership for each role keeps live systems simple to run and easy to audit across the whole team.

The query runs. The emails stay hidden.