cancel
Showing results for 
Search instead for 
Did you mean: 
Technical Blog
Explore in-depth articles, tutorials, and insights on data analytics and machine learning in the Databricks Technical Blog. Stay updated on industry trends, best practices, and advanced techniques.
cancel
Showing results for 
Search instead for 
Did you mean: 
SepidehHashemi
Databricks Employee
Databricks Employee

The Problem: One Too Many Warehouses

Your Tableau dashboards hit a cloud data warehouse. Your data engineering team builds ETL pipelines in Databricks. And somewhere in between, you're paying to move, copy, and sync data across both systems - just so an analyst can refresh a report.

This is the hidden tax of running BI on a separate data warehouse. You maintain duplicate data pipelines. You troubleshoot stale data when a sync job fails at 2 AM. You burn compute on two platforms to answer one question. And when someone asks, "Why don't the Tableau numbers match the notebook?" you already know the answer: because the data lives in two places.

It doesn't have to work this way. Databricks SQL (DBSQL) warehouses are purpose-built for BI workloads - the same concurrency, sub-second caching, and query optimization you expect from a traditional cloud data warehouse, but running directly on your lakehouse. That means Tableau can query the same tables your engineers write to. No sync jobs. No copies. One source of truth.

Lumen Technologies faced this exact problem. Their Call Detail Record Warehouse (CDRW) was running on Cloudera, an on-prem big data platform, with BI dashboards consuming hours of computation  just to answer basic operational questions. After migrating to Databricks SQL Serverless, queries that previously took hours now complete in minutes  -  a 90% improvement  -  while compute costs dropped by up to 40%. Their engineers, network operators, and finance teams now get answers in real time, from the same platform where the data lives. No separate warehouse. One system.

This post walks you through how to connect Tableau to DBSQL, configure your warehouse for dashboard performance, and adopt data modeling practices that make the whole setup fast and cost-efficient.image_4.pngFigure: Before vs. after - eliminating the separate data warehouse layer

Prerequisites

Before you start, confirm you have:

  • Databricks workspace with Unity Catalog enabled
  • SQL warehouse (Serverless recommended) - you'll need the Server Hostname and HTTP Path from the connection details tab
  • Tableau Desktop 2021.4+ or Tableau Cloud (Databricks ODBC driver 2.6.19+)
  • OAuth enabled for Tableau in your Databricks account (enabled by default for Desktop and Cloud; Tableau Server requires configuration). Note: OAuth tokens expire after 90 days by default  -  see Override Partner OAuth Token Lifetime Policy to adjust this for production deployments.
  • Unity Catalog permissions - appropriate user permissions like USE CATALOG, USE SCHEMA, and SELECT on the tables they need

Phase 1: Connect Tableau Desktop to DBSQL

You have two paths. Pick whichever fits your workflow.

Option A: Partner Connect (Fastest)

  1. In your Databricks workspace, go to Marketplace > Partner Connect
  2. Select the Tableau tile
  3. Choose your SQL warehouse as the compute resource
  4. Download the connection file - it launches Tableau Desktop with credentials pre-filled
  5. Authenticate via OAuth when prompted

image_2.png

Option B: Manual Connection

  1. Open Tableau Desktop and click Connect > Databricks
  2. Enter the Server Hostname and HTTP Path from your SQL warehouse's connection details
  3. Select Sign in using OAuth (recommended) or enter a Personal Access Token
  4. For Unity Catalog, set the default catalog in Advanced > Initial SQL: USE CATALOG your_catalog
  5. For Tableau Cloud, navigate to Data > New Data Source > Connectors > Databricks and follow the same credential steps.

image_1_masked.png

 Pro tip: Use Service Principal OAuth for production extract refreshes  -  it uses the OAuth client credentials flow for machine-to-machine authentication, avoiding token expiry issues tied to individual user accounts.

Launch from Databricks Catalog Explorer

For Tableau Cloud and Tableau Desktop from Databricks: You can also launch directly from your workspace. In Catalog Explorer, select a schema or table, click 'Use with BI tools' or 'Open in a dashboard,' and select 'Explore in Tableau Cloud' or 'Open in Tableau Desktop'.

image_3.png

Phase 2: Configure Your SQL Warehouse for Dashboard Performance

Connecting Tableau is the easy part. Making it fast under load takes intentional configuration.

Right-Size the Warehouse

Start with a Medium serverless warehouse for live/DirectQuery workloads  -  the BI workload settings guide recommends starting at Medium and scaling up based on query complexity and data volume. For extract/import workloads, start with Large or X-Large. DBSQL Serverless uses Intelligent Workload Management to automatically provision and scale clusters based on query demand, so you don't need to over-provision. Set the minimum and maximum cluster counts based on your anticipated workload, and monitor the 'Peak Queued Queries' metric to adjust  -  consistently non-zero values signal a need for more clusters.

Understand the Query Multiplier

One Tableau dashboard with five charts and a quick filter sends a minimum of 10 queries to DBSQL on every filter change. Add more filters and the count climbs fast. Several tactics help:

  • Use context filters in Tableau for values that rarely change  -  they reduce the query fan-out and speed up execution time
  • Build segment-specific dashboards instead of one dashboard with many dropdown filters. Tableau Actions (click-through navigation) are cheaper than quick filters  -  clicking a mark on one dashboard navigates to a filtered view on another, reducing both query count and record volume
  • Avoid table calculations where possible  -  they scan the full dataset client-side, bypassing DBSQL's query engine entirely. Push logic into calculated fields or SQL instead
  • Prefer if/else over case/when in Tableau calculated fields for better query performance
  • Leverage filter push-down  -  Tableau can push filters into the data source, which improves query speed. Structure your filters to take advantage of this rather than filtering post-retrieval

Leverage Caching  -  Both Sides of the Connection

Performance isn't just about the warehouse. Tableau and DBSQL each have their own caching layers, and understanding both is key to sub-second dashboard loads.

Tableau's four caching layers

Before a query ever reaches DBSQL, Tableau checks four caches in order:

  • Tiles: Reuses rendered dashboard tiles if nothing has changed  -  like a map tile cache
  • Model: Caches mathematical calculations used in visualizations
  • Abstract: Stores aggregate query results from prior loads
  • Native cache: Reuses results when the query is identical to a previous one

For Tableau Server, set the cache frequency to 'Refresh Less Often' for dashboards viewed repeatedly (e.g., Monday morning pipeline reports)  -  this retains cache for up to 12 hours. You can also warm the cache by setting up a dashboard subscription that fires before peak viewing hours. The dashboard must render to generate the subscription email image, which pre-populates the cache.

DBSQL's three caching tiers

Queries that make it past Tableau's cache hit DBSQL's own three-tier stack:

For dashboards viewed repeatedly, these server-side caches (not including UI cache) mean sub-second response times after the first load. In practice, we measured this directly using Tableau Desktop connected to DBSQL via a live connection. The first dashboard load took 1,115ms. The same view reloaded immediately returned in 153ms  -  an 86% improvement  -  with zero bytes read from storage. The result cache served the full response from memory. For analysts refreshing the same dashboard throughout the day, this means near-instant response times at no additional compute cost.

Tune Auto-Stop

For live/DirectQuery workloads, set auto-stop aggressively at 15–30 minutes to keep the warehouse warm between analyst sessions while controlling cost. For extract/import workloads that run in sequence, use longer auto-stop times of 1–2 hours so the warehouse stays up between jobs. The remote result cache on Serverless means restarts are less painful than they used to be  -  results persist across warehouse stops and are shared across all warehouses in the workspace.

Phase 3: Prepare Your Data for BI Serving

A fast warehouse won't save a bad data model. These patterns reduce query complexity at the source.

Model in Star Schema

Organize your gold-layer tables into fact and dimension tables. BI tools like Tableau are built for star schemas - they generate cleaner SQL, push down joins efficiently, and produce more predictable query plans.

Declare primary and foreign keys with the RELY keywords. These constraints are informational  -  Databricks does not enforce them  -  but with RELY, the query optimizer can exploit them to rewrite queries (e.g., eliminating redundant joins or simplifying aggregations). It is the user's responsibility to ensure the data satisfies the constraint; violations may produce incorrect query results.

Defining these constraints also benefits Tableau directly: Tableau automatically detects primary and foreign key constraints and uses them to create relationships at the physical layer. If no key constraints are defined, Tableau falls back to matching column names to auto-generate joins. For composite keys, Tableau detects both single-column and multi-column relationships. If auto-detection fails, you can manually configure joins by double-clicking the table at the logical layer to access the physical layer in Tableau's data model.

 

ALTER TABLE gold.sales_fact
  ADD CONSTRAINT pk_sales PRIMARY KEY (sale_id) NOT ENFORCED RELY;
ALTER TABLE gold.sales_fact
  ADD CONSTRAINT fk_customer
  FOREIGN KEY (customer_id)
  REFERENCES gold.customer_dim(customer_id) NOT ENFORCED RELY;

Use Materialized Views for Heavy Aggregations

If a Tableau dashboard runs the same expensive aggregation on every load, pre-compute it:

CREATE MATERIALIZED VIEW gold.daily_revenue_summary AS
SELECT
  date,
  region,
  SUM(revenue) AS total_revenue,
  COUNT(*) AS txn_count
  FROM gold.sales_fact
GROUP BY date, region;

Materialized views refresh incrementally. The dashboard queries a compact, pre-aggregated table instead of scanning millions of rows.

Apply Liquid Clustering

For large fact tables that analysts filter frequently (by date, region, customer segment), Liquid Clustering improves performance through file skipping:

ALTER TABLE gold.sales_fact CLUSTER BY (sale_date, region);

Enable predictive optimization on your Unity Catalog managed tables so DBSQL automatically runs OPTIMIZE, VACUUM, and ANALYZE based on actual query patterns - no manual maintenance scheduling needed.

We measured this directly with Tableau Desktop running live against DBSQL. A dashboard filtering one year of shipment data by return flag  -  the kind of view analysts build daily  -  scanned 10 files and 158.1MB of data from the unoptimized table. The same query against a Liquid Clustered table on identical data scanned 1 file and 9.6MB  -  a 94% reduction in data read. Fewer files scanned means less I/O, lower cost per query, and faster dashboard loads as your data grows.

Phase 4: Choose Live vs. Extract

This is the decision that trips up most teams migrating from a traditional data warehouse.

Start with live connections. DBSQL's caching and Serverless auto-scaling handle interactive workloads well, and you avoid the extract refresh pipeline entirely. Move specific workbooks to extracts only if you hit latency issues on very large scans.

For extract refreshes, use a separate SQL warehouse sized appropriately for your batch workload volume, with auto-stop set to 1–2 hours. This prevents extract jobs from competing with interactive dashboard queries.

Pro Tips and Best Practices

Warehouse & workload management

Separate warehouses by workload. Interactive dashboards and scheduled extract refreshes have different concurrency and sizing needs. Don't share a single warehouse across both, this prevents resource contention and enables independent scaling and cost tracking.

Monitor with system tables. Query system.query.history to identify slow Tableau queries (filter by client_application = 'Tableau'), track warehouse utilization, and right-size over time

SELECT *
FROM system.query.history
WHERE client_application = 'Tableau'
ORDER BY total_duration_ms DESC;

[Tableau Side] Use Performance Recording (available on Desktop and Server) to identify bottlenecks. It distinguishes between query execution latency (data engine / DBSQL) and visual layout latency (VizQL / Tableau rendering). If the bottleneck is query execution, tune the warehouse or optimize the data model. If it's VizQL, aggregate more aggressively or scale up the machine running Tableau.

[Tableau Side] Manage mark volume. Databricks can return one million records quickly, but Tableau may not be able to compute the layout and sort the results. Aggregate queries and enable drill-down into lower levels rather than displaying granular marks  -  granular marks are often a poor analytical pattern because they don't provide insight.

[Tableau Side] Scale Tableau hardware. Tableau is constrained only by the physical resources of the machine it runs on. If the visual layout is slow, upgrade CPU/RAM before increasing warehouse size.

What Gets Removed

This is the part that matters most for teams mid-SQL migration. When Tableau reports serve directly from DBSQL, you eliminate:

  • The sync pipeline between your lakehouse and a separate cloud data warehouse
  • Duplicate compute costs - one warehouse replaces two
  • Data freshness gaps - dashboards read from the same tables your pipelines write to
  • A class of debugging - "which copy of the data is Tableau reading?" stops being a question

You're not just swapping one connector for another. You're removing an entire layer of your architecture.

Conclusion

Running Tableau on a separate data warehouse made sense when lakehouses couldn't serve BI workloads. That's no longer the case. DBSQL Serverless warehouses deliver the concurrency, caching, and sub-second performance that Tableau dashboards demand - directly on your lakehouse data.

The data warehouse migration path is straightforward: connect Tableau to a SQL warehouse, model your gold tables for BI consumption, and lean on DBSQL's caching and auto-scaling to handle the load. The payoff is fewer systems, lower cost, and one version of the truth.

Ready to try it? Connect Tableau to your Databricks SQL warehouse using Partner Connect and start with a single dashboard. Once you see the numbers match - and the sync pipeline disappears - you won't want to go back.

Call to Action

Connect Tableau to your Databricks SQL warehouse using Partner Connect and start with a single dashboard.

References

Related Databricks Blogs