BigData / Tableau Interview Questions
What is a custom SQL connection in Tableau?
A custom SQL connection lets you write your own SQL query as the data source, instead of connecting to a table (or set of joined tables) through Tableau's visual data source pane.
SELECT customer_id, region, SUM(sales) AS total_sales FROM orders WHERE order_date >= '2025-01-01' GROUP BY customer_id, region
- Useful when the needed logic — complex joins, window functions, pre-aggregation — is easier to express directly in SQL than through Tableau's visual join interface.
- Custom SQL is treated by Tableau as a single "black box" table; Tableau doesn't know the underlying table structure, which can limit some optimizations it would otherwise apply to a native table connection.
- Because the query text becomes part of the data source definition, changing requirements often means editing the SQL directly rather than adjusting fields visually.
Custom SQL is a powerful escape hatch, but it comes with a performance caution: since Tableau can't push some filters down into a custom SQL query as efficiently as it can with native tables, extracts built from custom SQL are often recommended over live connections to those same queries, especially for anything complex or frequently used.
More Related questions...