How to Integrate Mode and Databricks Safely

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair mode and databricks to turn raw warehouse data into fast, shared charts. Mode runs SQL queries on Databricks compute clusters and renders visual reports for analysts. This workflow brings SQL, Python notebooks, and business charts into one shared workspace. Data engineers build clean tables in the lakehouse. Analysts then query those tables to build live dashboards for the whole team. Fast queries need good security rules to keep private data safe. How mode and databricks share dat

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 pair mode and databricks to turn raw warehouse data into fast, shared charts. Mode runs SQL queries on Databricks compute clusters and renders visual reports for analysts.

This workflow brings SQL, Python notebooks, and business charts into one shared workspace. Data engineers build clean tables in the lakehouse. Analysts then query those tables to build live dashboards for the whole team. Fast queries need good security rules to keep private data safe.

How mode and databricks share data and permissions

Mode talks to Databricks over a secure network link using standard database drivers. You set up a data source in Mode with your cluster connection details. Those details include the host address, the cluster path, and an access token. You can also use a service identity instead of a personal user token.

When an analyst runs a report, Mode sends the SQL text to the cluster. The cluster checks the token permissions against the catalog rules. If the role allows read rights, the cluster runs the query and returns rows. Mode caches the result set and builds charts and tables in the browser.

Unity Catalog inside the lakehouse controls which tables and views that identity can read. You can grant read rights on specific schemas while blocking raw staging tables. This setup keeps analysts focused on clean, trusted data models.

Common failure modes with shared service accounts

Many teams link their BI app to the lakehouse with one shared token. A single admin creates a personal token and pastes it into the workspace settings. Every analyst in that workspace then runs queries under that one admin identity. This shortcut creates three big problems for data and security teams.

First, the shared token often has far too much power. If the admin can read every table, every chart builder can read them too. Analysts can query raw tables with emails, phone numbers, card numbers, or national IDs. Second, the cluster query log only shows the single service account name. When a bad query slows down the cluster, you cannot see who wrote it. Third, long-lived personal tokens do not expire on their own by default. If an old employee leaves, revoking their account might break every production report.

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 replacing personal user tokens with a dedicated machine identity for your BI tool. Create a separate role in your catalog just for reporting queries. Grant that role select permissions only on gold reporting views and curated schemas. Never give the reporting role rights to drop tables or modify raw source files.

Split your workspaces or data connections by team function when data needs stay strict. Give the finance team one data source linked to a finance catalog role. Give the marketing team a separate data source scoped only to marketing tables. This split stops general users from querying private financial rows inside the SQL editor.

Lock down network paths so only trusted traffic can reach your compute clusters. Configure IP allowlists in your cloud account to restrict inbound traffic to known addresses. Turn on cluster audit logs to track query text, run times, and row counts. Set up data masking rules to rewrite emails and card numbers in query results. Review active tokens every quarter and rotate keys on a set schedule.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Use a dedicated service identity instead of a personal user token for shared links. Service identities stay active when staff leave and let you scope table rules cleanly.

How do we stop analysts from querying raw sensitive tables in Mode?

Create a restricted role in your catalog that only reads curated reporting schemas. Link that role to your BI data source and block access to raw staging tables.

Why do all BI queries show up under one user in cluster logs?

Shared data sources use a single credential to run every query from the workspace. You must check BI app audit logs or add user metadata to trace individuals.

The query runs. The emails stay hidden.