How to Connect BigQuery to Tableau

Galaxy Glossary

How do I connect BigQuery to Tableau?

Connect Google BigQuery to Tableau to visualize large datasets with live or extracted queries.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.

Description

What prerequisites are mandatory?

Enable the BigQuery API, create or download a service-account JSON key, and install Tableau Desktop or Tableau Cloud.Confirm you have BigQuery tables such as Customers, Orders, Products, and OrderItems.

How do I start the connection in Tableau Desktop?

Open Tableau → Connect pane → Google BigQuery → sign in with Google or "+ Service Account" → browse projects → pick a dataset.

Which authentication options exist?

Google OAuth (interactive)

Best for personal use; requires browser login each publish.

Service-Account JSON

Best for production; paste JSON file path or content to allow unattended refreshes.

What is the exact connection syntax?

Tableau builds a JDBC URL behind the scenes:
jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<project>;OAuthType=0;OAuthServiceAcctEmail=<client_email>;OAuthPvtKeyPath=<keyfile.json>;Dataset=<dataset>;DSProxyHost=<optional>;

How do I bring specific tables into Tableau?

Drag Orders and OrderItems onto the canvas.Choose Inner Join on order_id. Apply data source filters if needed.

When should I use extracts vs. live?

Use Live for near-real-time dashboards with small row counts.Use Extract to cache >10 million rows, schedule refreshes, and leverage Tableau’s Hyper engine.

How do I write custom SQL in BigQuery for Tableau?

Select New Custom SQL → paste a query such as:
SELECT c.name, SUM(oi.quantity*p.price) AS customer_ltvFROM `project.dataset.Customers` cJOIN `project.dataset.Orders` o ON o.customer_id=c.idJOIN `project.dataset.OrderItems` oi ON oi.order_id=o.idJOIN `project.dataset.Products` p ON p.id=oi.product_idGROUP BY c.name

What performance tuning options exist?

Use BigQuery materialized views, limit columns, parameterize date filters, and enable Tableau Query Fusion.Disable “Allow Large Results” to avoid slot overuse.

Best practices recap

1) Prefer service accounts for shared workbooks. 2) Keep extracts under 10 GB. 3) Store BigQuery temp tables in the same region as data. 4) Monitor QUERY_PLAN cache hits.

.

Why How to Connect BigQuery to Tableau is important

How to Connect BigQuery to Tableau Example Usage


SELECT o.id,
       o.order_date,
       c.name        AS customer_name,
       p.name        AS product_name,
       oi.quantity,
       (oi.quantity * p.price) AS line_total
FROM `myshop.Orders`      o
JOIN `myshop.Customers`   c  ON c.id = o.customer_id
JOIN `myshop.OrderItems`  oi ON oi.order_id = o.id
JOIN `myshop.Products`    p  ON p.id = oi.product_id
WHERE o.order_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY);

How to Connect BigQuery to Tableau Syntax


jdbc:bigquery://https://www.googleapis.com/bigquery/v2:443;ProjectId=<project_id>;Dataset=<dataset>;[OAuthType=0|1];[OAuthServiceAcctEmail=<email>];[OAuthPvtKeyPath=<keyfile.json>];[Timeout=<seconds>];[SQLDialect=standard|legacy]

Common Mistakes

Frequently Asked Questions (FAQs)

Can I use Tableau Public with BigQuery?

No. Tableau Public supports only extracts saved in the workbook; BigQuery connectors require Tableau Desktop, Cloud, or Server.

Is Standard SQL mandatory?

Tableau defaults to Standard SQL. Legacy SQL is possible by adding SQLDialect=legacy in the connection string but is discouraged.

How do I refresh extracts on Tableau Server?

Create a service-account credential, embed it in the published data source, and schedule refreshes in Tasks → Extract Refreshes.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie
BauHealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
Oops! Something went wrong while submitting the form.