Tableau • Connecting to Data

Creating & Refreshing Extracts — Create and refresh extracts; understand incremental refresh conceptually

Master Tableau's extract engine to decouple analyses from live databases and accelerate dashboard performance.

Tableau illustration with a dashboard presentation, data visualization, and database
Inside this lesson 10 sections 5 questions 7 figures

SECTION 1

Historical Context & Motivation

Before the rise of modern business intelligence platforms, analysts routinely issued ad-hoc SQL queries directly against production databases, contending with network latency, schema changes, and resource contention that slowed both their own work and operational workloads. As datasets grew from millions to billions of rows in the 2000s, it became clear that a local snapshot of the data—optimized for analytical rather than transactional access patterns—could drastically improve both performance and reliability. Tableau's extract technology answered exactly this need, giving analysts a portable, columnar-compressed copy of data that could be queried without touching the live source.

Understanding this evolution is essential for any computer science student working at the intersection of data engineering and visualization. The extract paradigm reflects broader trends in database architecture—read-optimized stores, materialized views, and OLAP cubes—packaged in a form accessible to non-engineering users. Appreciating the historical arc clarifies why extracts exist, when they are appropriate, and what trade-offs they introduce compared to a live connection.

2003 • Tableau's Founding & VizQL

Tableau Software is founded at Stanford, introducing VizQL—a visual query language that translates drag-and-drop interactions into database queries. Early versions rely entirely on live connections.

2008 • Introduction of TDE Extracts

Tableau ships the Tableau Data Extract (TDE) format, a columnar store that enables offline analysis and faster aggregation on local hardware.

2014 • Incremental Refresh & Scheduling

Tableau Server adds scheduled extract refreshes and an incremental refresh option, allowing only new rows to be appended rather than rebuilding the entire extract.

2018 • Hyper Engine Replaces TDE

Tableau introduces the Hyper engine, a high-performance in-memory analytical database that replaces TDE files with .hyper files, offering substantial speed improvements through compiled query execution and multi-threaded reads.

2021+ • Cloud-Native Extract Management

Tableau Cloud and Tableau Server provide robust extract APIs, run-now triggers, and monitoring dashboards that integrate extracts into enterprise DataOps pipelines.

The central question this lesson addresses is deceptively simple: how do you create, manage, and keep current a local copy of data in Tableau? Answering it requires understanding the mechanics of extract creation, the distinction between full and incremental refresh strategies, and the engineering trade-offs around data freshness versus query speed—concepts that generalize far beyond Tableau into the broader domain of data systems.

SECTION 2

Core Principles & Definitions

At its core, a Tableau extract is a persisted, columnar snapshot of data stored in the .hyper file format. Unlike a live connection—which issues SQL (or equivalent) queries directly to the source system in real time—an extract decouples the analytical workload from the source. This decoupling introduces a staleness window but yields dramatic improvements in query latency, portability, and source-system load reduction. The following principles underpin every decision about when and how to use extracts.

1

Columnar Compression

The Hyper engine stores data in a column-oriented layout with dictionary encoding, run-length encoding, and bit-packing. This mirrors the design of analytical databases like Apache Parquet or ClickHouse, resulting in high compression ratios and fast aggregation scans.
2

Snapshot Semantics

An extract represents the state of the source at the moment the extract was created or last refreshed. Until the next refresh, any changes to the source are invisible to Tableau workbooks consuming the extract.
3

Full vs. Incremental Refresh

A full refresh replaces the entire extract with a fresh copy. An incremental refresh appends only new rows identified by a monotonically increasing key, minimizing refresh time and source load.
4

Offline Portability

Because the .hyper file is self-contained, workbooks backed by extracts can be opened on laptops without network access—ideal for field presentations and travel.
5

Pre-Aggregation & Filtering

During extract creation, you can apply extract filters and choose to aggregate visible dimensions, significantly reducing file size and query complexity for dashboards that do not require row-level detail.
✦

KEY TAKEAWAY

Think of an extract like a compiled binary in software engineering. Your source database is the source code—authoritative but slow to interpret at runtime. The extract is the compiled executable: optimized for fast execution, but you must recompile (refresh) whenever the source changes. A full refresh is a clean rebuild; an incremental refresh is like an incremental compilation that only reprocesses new or changed translation units.

SECTION 3

Visual Explanation — Extract Lifecycle

The diagram below illustrates the complete lifecycle of a Tableau extract, from initial creation through scheduled refreshes and eventual consumption by dashboards. Each stage is color-coded to correspond with the process phase: source connection in blue, extract creation in violet, refresh operations in amber and emerald, and dashboard consumption in cyan. Follow the arrows to trace the data flow from left to right.

Extract Lifecycle — From Source to DashboardDATA SOURCESQL Server, CSV,Cloud DB, etc.CREATE EXTRACTApply filtersChoose aggregationGenerate .hyper file.HYPER FILEColumnar, compressedlocal snapshotDASHBOARDQueries .hyper locallyFast aggregationFULL REFRESHDrop & rebuild entireextract from sourceO(N) rows transferredINCREMENTAL REFRESHAppend rows wherekey > max(existing key)O(ΔN) rows transferredSchedule oron-demandRequiresmonotonic keyBoth paths update the same .hyper file → dashboard reflects new data
The top row shows the creation pipeline: a data source feeds into the extract creation step, producing a .hyper file consumed by dashboards. Below, two refresh strategies—full refresh and incremental refresh—update the same file. Note the asymptotic notation indicating the data transfer cost of each approach.

As the diagram makes clear, the extract sits between the data source and the dashboard as a caching layer. The two refresh paths share the same output artifact—the .hyper file—but differ radically in cost. A full refresh transfers every row from the source, making it suitable when data undergoes updates or deletes. An incremental refresh transfers only the delta, which is far cheaper but is limited to append-only workloads where existing rows are never modified. Understanding this distinction is the key to designing efficient refresh schedules.

SECTION 4

How It Works — Full & Incremental Refresh Internals

While Tableau abstracts the mechanics behind a simple UI toggle, understanding the underlying operations helps you reason about performance, failure modes, and data integrity. This section formalizes the two refresh strategies and examines what happens inside the Hyper engine during each.

Full Refresh Procedure

A full refresh operates as a destructive rebuild. Tableau opens a connection to the original data source, executes the query defined in the extract (including any extract filters), streams all result rows into a new temporary .hyper file, and upon successful completion atomically replaces the old file. This approach guarantees that deletes and updates in the source are captured, but it incurs a cost proportional to the total row count N.

FULL REFRESH COST

Tfull=N×(tread+tcompress+twrite)T_full = N × (t_read + t_compress + t_write)

Where N = total rows in the source query result, t_read = per-row read time from source over the network, t_compress = per-row columnar encoding time, t_write = per-row disk write time. In practice, t_read dominates for remote sources.

Incremental Refresh Procedure

An incremental refresh requires the user to designate a column that is monotonically increasing—typically a date/time column, an auto-incrementing integer primary key, or a sequence number. During refresh, Tableau records the maximum value of this column from the existing extract, denoted max(k). It then queries the source for all rows where the key column exceeds max(k), and appends those rows to the existing .hyper file. This append-only semantics means the transfer cost is proportional to ΔN—the number of new rows—rather than N.

INCREMENTAL REFRESH COST

Tincr=ΔN×(tread+tcompress+twrite)whereΔN=∣r∈Source∣r.key>max(k)∣T_incr = ΔN × (t_read + t_compress + t_write) where ΔN = |{r ∈ Source | r.key > max(k)}|

Because ΔN ≪ N for typical append-heavy workloads (e.g., event logs, transaction tables), T_incr ≪ T_full. The speed-up ratio is approximately N / ΔN.

⚠

Critical Limitation

Incremental refresh cannot detect updates or deletes in existing rows. If a source row with key = 100 is modified after it was extracted, the extract will retain the stale version. For mutable data, you must still schedule periodic full refreshes to reconcile the extract with the source.

A common production pattern combines both strategies: run incremental refreshes frequently (e.g., every 15 minutes) to keep the extract near real-time, and schedule a full refresh during a low-traffic maintenance window (e.g., nightly) to capture any in-place updates. This hybrid approach balances data freshness with source system load in a way analogous to write-ahead logging with periodic checkpointing in database systems.

SECTION 5

Detailed Breakdown — Extract Configuration Options

When creating an extract in Tableau Desktop, several configuration options determine the shape, size, and refresh behavior of the resulting .hyper file. Understanding each option and its implications is essential for building extracts that are both performant and appropriately scoped.

Extract Configuration Decision TreeSTART: Create ExtractNeed all rows or subset?SubsetAll rowsAdd Extract FiltersWHERE conditions on columnsNo filters neededFull dataset extractedAggregate for visible dimensions?YesNoPre-Aggregated ExtractSmallest file, fastest queriesRow-Level ExtractFull detail preserved→ Configure refresh strategy (Full / Incremental)
This decision tree walks through the key choices when configuring an extract: whether to apply extract filters to limit rows, whether to pre-aggregate data to the visible dimension granularity, and finally, the refresh strategy selection.
Configuration OptionEffect on ExtractWhen to Use
Extract FiltersApplies WHERE-like conditions during creation, reducing the row count in the .hyper file.When dashboards only need a subset of source data (e.g., last 2 years, specific regions).
AggregationPre-computes SUM, AVG, etc. at the visible dimension grain; collapses millions of rows to thousands.When row-level detail is unnecessary and dashboards display only aggregated metrics.
Top N / SampleLimits the extract to the top N rows or a random sample, useful during prototyping.During development to speed up iteration on large datasets.
Incremental Key ColumnDesignates a monotonically increasing column used to identify new rows during incremental refresh.For append-only data sources like event logs, sensor readings, or transaction tables.
Hide Unused FieldsExcludes columns not referenced by the workbook, reducing file size and improving compression.Always recommended for production extracts to minimize storage and transfer costs.

Key extract configuration options and their implications

SECTION 6

Worked Example — Creating and Refreshing an Extract

Consider a scenario where you are building a sales dashboard against a PostgreSQL database containing 50 million order records. The database is shared by several OLTP applications, and your DBA has requested that you minimize query load during business hours. You decide to use an extract with incremental refresh.

End-to-End Extract Workflow

  1. 1

    Step 1 — Connect to Data Source

    In Tableau Desktop, navigate to Connect → To a Server → PostgreSQL. Enter the server hostname, port (default 5432), database name, and credentials. Tableau establishes a JDBC connection and lists available schemas and tables.
    Live connection to the orders table is established.
  2. 2

    Step 2 — Switch Connection Type to Extract

    In the Data Source pane, locate the Connection radio buttons in the upper-right corner. Select Extract instead of Live. This signals Tableau to create a local .hyper file rather than querying PostgreSQL in real time.
    The Extract indicator appears in the data source pane.
  3. 3

    Step 3 — Configure Extract Filters

    Click Edit next to the Extract indicator. In the Extract Data dialog, click Add under Filters and add a date filter: order_date ≥ 2023-01-01. This limits the extract to approximately 12 million rows instead of 50 million, reducing file size from ~4 GB to ~1 GB.
    Extract filter applied: only orders from 2023 onward will be included.
  4. 4

    Step 4 — Set Incremental Refresh Key

    In the same dialog, select Incremental refresh and choose the order_id column (an auto-incrementing BIGINT) as the incremental key. Tableau will record max(order_id) after each refresh and query only WHERE order_id > max(order_id) on subsequent runs.
    Incremental key set to order_id. Subsequent refreshes will transfer only new orders.
  5. 5

    Step 5 — Create the Extract & Publish

    Click Extract to begin the initial full extraction. Tableau reads 12 million rows from PostgreSQL, compresses them into a .hyper file (~1 GB), and saves it locally. Build your dashboard visualizations, then publish the workbook to Tableau Server via Server → Publish Workbook. In the publish dialog, configure a refresh schedule: incremental every 30 minutes during business hours, full refresh nightly at 2:00 AM.
    Extract created, published, and scheduled. Incremental refreshes transfer ~5,000 new rows per cycle (≈ 0.04% of the extract) instead of re-reading 12 million rows.
💡

Performance Insight

In this example, the speed-up ratio for each incremental refresh is approximately 12,000,000 / 5,000 = 2,400×. Even accounting for fixed overhead (connection setup, metadata bookkeeping), incremental refreshes complete in seconds rather than the minutes required for a full refresh.

SECTION 7

Live Connection vs. Extract — Trade-offs & Comparisons

Choosing between a live connection and an extract is not a binary decision—it depends on a matrix of factors including data volume, update frequency, user concurrency, and the capabilities of the source system. The following comparison table synthesizes the key trade-offs along dimensions that matter in production environments.

DimensionLive ConnectionExtract
Data FreshnessReal-time; every query reflects the current source state.Stale by the duration since last refresh (minutes to hours).
Query PerformanceDepends on source DBMS speed, network latency, and concurrent load.Consistently fast; Hyper engine optimized for OLAP queries locally.
Source System LoadEvery dashboard interaction generates source queries; heavy with many users.Source queried only during refresh; minimal ongoing load.
Offline AccessRequires active network connection; no offline use.Fully portable; .hyper file can be used without connectivity.
Row-Level SecurityEnforced by the database via user credentials and views.Must be implemented in Tableau via extract filters or user-based calculations.
Storage OverheadNone beyond the source; no duplicated data.Additional disk space for .hyper files on Tableau Server or local machine.
Best ForSmall to medium datasets with real-time requirements.Large datasets, multiple concurrent users, offline scenarios.

Live Connection vs. Extract: a comprehensive comparison

✦

KEY TAKEAWAY

The extract-vs-live decision mirrors a classic distributed systems trade-off familiar from the CAP theorem: you cannot simultaneously have perfect consistency (real-time data), high availability (offline access), and low latency (fast queries) across a network partition. An extract sacrifices consistency (data freshness) to gain availability and performance. A live connection prioritizes consistency at the cost of latency and availability. In practice, most production deployments use extracts for broad consumption and reserve live connections for operational dashboards that require up-to-the-second accuracy.

SECTION 8

Connection to Advanced Theory — Hyper Engine & Beyond

The Hyper engine that powers Tableau extracts is itself a research-grade analytical database, originally developed at the Technical University of Munich. Understanding its architectural choices—and how they relate to broader database theory—provides insight into why extracts perform so well and where the technology is headed.

ConceptBasic Extract UsageAdvanced / Emerging
Refresh GranularityFull or incremental (append-only) at scheduled intervals.Hyper API enables programmatic INSERT, UPDATE, DELETE on .hyper files, supporting custom CDC (Change Data Capture) pipelines.
Query ExecutionInterpreted VizQL-generated queries against columnar store.Hyper uses just-in-time (JIT) compiled query execution, generating machine code per query for CPU-cache-optimal data access.
Data FederationSingle-source extracts; join data within one connection.Cross-database joins and relationships allow combining extracted and live sources in a single workbook.
AutomationGUI-based scheduling in Tableau Server/Cloud.Tableau REST API and tabcmd CLI enable CI/CD-style extract management within orchestration tools like Apache Airflow or dbt.
Materialized Views AnalogyExtracts as manually refreshed materialized views.Tableau Catalog and Data Management features move toward automatically maintained, lineage-tracked materialized views.

Basic extract usage versus advanced and emerging patterns

For students continuing in data engineering or database research, the Tableau extract paradigm provides an accessible entry point into several advanced topics: columnar storage and vectorized execution (as seen in Apache Arrow and DuckDB), change data capture for incremental materialization (Debezium, Kafka Connect), and query compilation techniques (LLVM-based JIT in PostgreSQL, Hyper, and Umbra). The .hyper file itself can be programmatically created and manipulated using Tableau's open-source Hyper API (available in Python, Java, and C++), enabling integration with any data pipeline.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain, in your own words, why a Tableau extract is conceptually analogous to a materialized view in a relational database system. Identify one key difference between the two.
Show answer
A materialized view and a Tableau extract both store the pre-computed result of a query as a persistent, queryable artifact, decoupling read workloads from the base tables. Both require explicit refresh operations to incorporate source changes. A key difference is that materialized views reside within the DBMS and can leverage the database's own incremental maintenance algorithms (e.g., detecting which rows changed via triggers or log-based tracking), whereas a Tableau extract is an external .hyper file that can only detect new rows via a monotonically increasing key during incremental refresh—it cannot natively detect in-place updates or deletes without a full rebuild.

Question 2: BASIC CALCULATION

A data source contains 20 million rows. Each full refresh takes 8 minutes. If 15,000 new rows are appended per hour and the per-row transfer time is constant, estimate how long an incremental refresh would take.
Show answer
The per-row transfer time is T_full / N = 8 minutes / 20,000,000 = 0.0000004 minutes/row = 24 microseconds/row. An incremental refresh transferring ΔN = 15,000 rows takes T_incr = 15,000 × 0.0000004 minutes = 0.006 minutes ≈ 0.36 seconds. In practice, connection setup overhead adds a few seconds, so expect roughly 3–5 seconds total. The speed-up ratio is 20,000,000 / 15,000 ≈ 1,333×, confirming that incremental refresh is dramatically faster for append-heavy workloads.

Question 3: INTERMEDIATE

You have a fact table where approximately 2% of historical rows are updated each day due to late-arriving corrections, and 50,000 new rows are inserted daily. You currently use incremental refresh on an auto-incrementing transaction_id. Describe the data quality problem this creates, and propose a refresh schedule that balances freshness with source load.
Show answer
The incremental refresh will correctly capture the 50,000 new rows each day, but the 2% of updated historical rows will retain their stale values in the extract because incremental refresh only appends rows with keys greater than the current maximum. Over time, the extract diverges from the source, potentially causing dashboards to report incorrect totals or statuses. The recommended solution is a hybrid schedule: run incremental refreshes every 30 minutes during business hours to keep new data current (each cycle transferring ≈ 1,000 rows), and schedule a nightly full refresh during a maintenance window (e.g., 2:00–4:00 AM) to reconcile updates and deletes. This provides near-real-time freshness for new data while guaranteeing that no stale corrections persist beyond 24 hours.

Question 4: APPLIED

Your organization uses Apache Airflow for data pipeline orchestration. Describe how you would integrate Tableau extract refreshes into an Airflow DAG that runs an ETL pipeline loading data from an S3 bucket into a Snowflake warehouse. Include the specific Tableau API or tool you would use and explain where in the DAG the refresh task should be placed.
Show answer
After the ETL pipeline's final task (e.g., a dbt run or Snowflake COPY INTO command) loads transformed data into the analytics schema, you would add a downstream Airflow task that triggers a Tableau extract refresh via the Tableau REST API. Specifically, you would authenticate using the Sign In endpoint to obtain an auth token, then call the 'Run Extract Refresh Task' endpoint (POST /api/3.x/sites/{siteId}/tasks/extractRefreshes/{taskId}/runNow). This task should be placed after the ETL completion sensor/task to ensure the extract is refreshed only after fresh data is available in Snowflake. Alternatively, you could use the tabcmd command-line tool (tabcmd refreshextracts --datasource 'SalesData') wrapped in a BashOperator. Setting the Airflow task's retry count and timeout appropriately guards against failed refreshes blocking downstream reporting tasks.

Question 5: CRITICAL THINKING

Tableau's incremental refresh can only append rows identified by a monotonically increasing key. Propose a design for a more general incremental refresh mechanism that could also detect updated and deleted rows without performing a full table scan on the source. Discuss the trade-offs of your design in terms of source system requirements, complexity, and latency.
Show answer
A more general approach would leverage Change Data Capture (CDC). The source database would maintain a change log (analogous to a write-ahead log or a CDC table populated by triggers, logical replication slots in PostgreSQL, or Debezium connectors for Kafka). During an incremental refresh, Tableau would read the change log rather than querying the base table, receiving INSERT, UPDATE, and DELETE events. For inserts, rows are appended to the extract as before. For updates, the engine would locate the matching row in the .hyper file by primary key and overwrite it. For deletes, the row would be marked as removed or physically deleted. The trade-offs are significant: the source system must support and maintain a change log, adding operational complexity and storage overhead. The Hyper engine would need to support point-lookup updates (currently it is optimized for bulk writes). Latency improves dramatically for large tables because only changed rows are processed. This design mirrors how systems like Materialize or Flink handle incremental view maintenance, and it represents a natural evolution that Tableau's Hyper API partially enables today through programmatic INSERT/UPDATE/DELETE operations on .hyper files—though without the automated CDC integration layer.

SUMMARY

Summary — Creating & Refreshing Extracts

Summary

A Tableau extract is a local, columnar-compressed snapshot of data stored in the .hyper format, designed to decouple analytical queries from live data sources and deliver fast, portable dashboards. Extracts are created by switching the connection type from Live to Extract in Tableau Desktop, optionally applying extract filters and pre-aggregation to reduce file size. Once published to Tableau Server or Cloud, extracts can be kept current through scheduled refreshes.

Two refresh strategies exist: a full refresh replaces the entire extract (cost proportional to total rows N), while an incremental refresh appends only new rows identified by a monotonically increasing key (cost proportional to ΔN). Incremental refresh cannot detect updates or deletes, so production deployments typically combine frequent incremental refreshes with periodic full refreshes. The choice between extracts and live connections reflects a fundamental trade-off between data freshness and query performance—a pattern that recurs throughout distributed data systems.

Varsity Tutors • Tableau • Creating & Refreshing Extracts