How to Integrate Redash and BigQuery Safely
Integrating redash and bigquery lets teams run SQL queries and build live charts over warehouse data. You link the two tools with a cloud service account and read-only dataset roles. This setup helps analysts explore large tables fast. Yet poor role setup can expose private data or drive up cloud bills. You need clear rules for keys, roles, and query limits before you go live. How redash and bigquery work together Redash is an open source tool for SQL queries and shared dashboards. BigQuery
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.
Integrating redash and bigquery lets teams run SQL queries and build live charts over warehouse data. You link the two tools with a cloud service account and read-only dataset roles.
This setup helps analysts explore large tables fast. Yet poor role setup can expose private data or drive up cloud bills. You need clear rules for keys, roles, and query limits before you go live.
How redash and bigquery work together
Redash is an open source tool for SQL queries and shared dashboards. BigQuery is a cloud data warehouse built for fast analytics over huge datasets. When you link them, analysts write SQL in the browser and send jobs to the warehouse.
To set up the link, you create a Google Cloud service account. That account holds a private JSON key file. You upload that key into the dashboard app when you add the data source.
When a user clicks run, the app sends the SQL text to the cloud API. The cloud warehouse checks the service account role to see if the action is allowed. If the check passes, the warehouse scans the tables and sends the rows back.
The dashboard app then stores the result cache and draws the charts. Users can set timers to refresh these charts on a schedule. Each refresh runs a new job under that same service account.
Common security risks with shared service accounts
Most teams start by making one service account for the whole analytics app. They often grant this account broad project viewer or editor roles to save time. This shortcut creates three major security risks in production.
First, every user in that dashboard group shares the exact same cloud role. If one dataset holds customer emails or card numbers, anyone with that source can query it. You lose fine control over which person can read which table.
BigQuery IAM + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Second, cloud audit logs only show the shared service account name. When a bad query spikes your bill, you cannot see which human ran it. You have to dig through app metadata to match timestamps and query text.
Third, static JSON keys never expire on their own. If a key leaks from a backup or dev server, an attacker can read your warehouse from anywhere.
Scoping roles and network paths in production
You can fix these risks by tightening roles and splitting data sources. Never give the dashboard service account project-wide admin or editor rights. Grant read-only dataset access only on the specific tables needed for reports.
Split your data sources by team or data sensitivity level. Create one cloud service account for finance tables and another for marketing tables. Link each account to a separate data source in the dashboard app. Then map each data source to a matching user group inside the app.
Set a maximum bytes billed limit on the data source settings. This rule stops runaway queries before they scan terabytes of raw logs. It protects your cloud budget from missing date filters or bad joins.
Keep raw sensitive fields out of standard reporting datasets. Use authorized views in the warehouse to hide columns with phone numbers or national IDs. You can also apply data masking so queries rewrite matched fields in results. Finally, rotate your service account keys on a fixed schedule and restrict network paths to known IP ranges.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
How do I stop users from running huge queries in BigQuery from Redash?
Set a scan limit in the data source settings or on the cloud project. Queries that exceed the byte limit will fail before they run and accrue costs.
Can I restrict which tables a Redash group can read?
Yes, create a separate cloud service account with access to specific datasets only. Add it as a new data source and assign it to one user group.
How should we handle sensitive fields like emails or card numbers?
Place clean views in a separate reporting dataset or apply dynamic data masking. Masking rewrites matched fields in results so analysts work with safe values.
Related guides
In this post