Video | Tableau | Data prep | Data engineering

How to write to a database

Tableau Prep can finally write straight back to a database — here's the full feature, warts and all.

Watch on YouTube
  • Tableau Prep 2020.3 lets you write flow output directly to a database via a new 'Database table' output option, alongside the existing 'Publish data source' option.
  • Only certain relational databases are supported at launch: SQL Server, MySQL, Postgres, Amazon Redshift, Snowflake, Oracle and Teradata.
  • You get three write modes — create table, append to table and replace data — each behaving exactly as named.
  • Appending without an ID or timestamp key is risky, since you can't tell which rows arrived when; treat each write as a snapshot and add a time key to separate states.
  • Writing to a database is preferable to publishing a data source in enterprise contexts because the data becomes available to other non-Tableau systems.

Tableau Prep can now write flow output directly into a relational database instead of only publishing to Tableau Server, which matters most in enterprise setups where other non-Tableau systems need access to that data.

Demonstrated using the built-in Superstore sample flow in Tableau Prep, writing to a local Postgres database set up for testing purposes.

The Breakdown
  1. Switch an output to database table 1:35

    On any flow output, the output dropdown now offers 'Database table' alongside the existing 'Publish data source' option — this is the new capability, and you must choose it before any of the database-specific settings appear.

  2. Only certain databases are supported 2:01

    At launch this works with SQL Server, MySQL, Postgres, Amazon Redshift, Snowflake, Oracle and Teradata — check your target database is on this list before attempting to use the feature.

  3. Connect with standard database credentials 2:50

    You connect much like any other database connection: server address, database name, username and password. Once connected, the pane lists the existing tables in that database so you can see what's already there.

  4. Name a table, new or existing 3:59

    You either pick an existing table or type a new table name; if the name doesn't exist, Prep offers to create it. This naming step must happen before you can select a write mode.

  5. Pick one of three write modes 5:07

    Create table always builds a fresh table each run (discarding any existing one with that name); append to table adds rows to the end of an existing table; replace data empties the table and writes new data in. Choose based on whether you want a rebuild, an accumulation, or a refresh.

  6. Run the flow and verify in the database 6:26

    Running the flow pushes data straight through to the database rather than to Tableau Server; you can confirm success by checking the target database directly for the new table and its columns.

  7. Add a key before you append repeatedly 7:21

    Appending without an ID or timestamp is risky: you end up with duplicate rows and no way to tell which batch arrived when. Treat each append as a snapshot and add a time or ID key so you can separate states later — without this, repeated appends can fail or corrupt your data.

  8. Why write to database over publish 9:41

    In enterprise contexts, writing to a database is often preferable to publishing a data source because the data then becomes available to other systems in the organisation that aren't running Tableau.

Worth Knowing
  • Appending to a table without a proper time/ID key caused an outright error in testing — Prep couldn't determine which rows belonged to which write.
  • Trying to append to a table that doesn't exist yet also throws an error; the table must be created first.
  • At the time of recording, Tableau Prep's documentation for this feature hadn't been released, so exact behaviour and error conditions weren't fully confirmed.
  • Only a fixed list of relational databases is supported at launch — this isn't a universal database write feature yet.
Use It When

Reach for this when you need Prep's output to land in a database that other tools or systems in your organisation can query, rather than being locked inside a Tableau Server data source.

How this Rollup was made provenance & method

A Rollup is drafted by AI from the video's transcript, then reviewed and edited by Tim. Everything used to produce this one is listed below — the model, the exact prompt, and the source video — so the process is transparent and reproducible.

Transcription
On-device — NVIDIA Parakeet v3 for recent videos, OpenAI Whisper large-v3 for earlier ones. The transcript never leaves the machine or gets published.
Drafting
Claude Sonnet 5 in the cloud, from that transcript.
Prompt
The exact Rollup prompt (v2) — the full system prompt, unedited.
Source video
Watch on YouTube
Drafted
5 July 2026 at 09:38
Reviewed & edited
5 July 2026 at 09:41 · by Tim Ngwena

Model + prompt + video is everything you'd need to recreate a Rollup like this yourself. The one thing we don't share is the transcript.

Rights. The video and its transcript are the property of TN Media Ltd. Unauthorised use or download is prohibited. © TN Media Ltd.