Video | Tableau | Data prep | Productivity

How to run Tableau Prep flows in the command line 2020.3 & later

A video showing how you can automate Tableau Prep on your computer.

Part ofWhat's new in Tableau 2020.3Tableau Prep Builder tutorial Jan-2020
Watch on YouTube
  • The Tableau Prep CLI batch file lives in the script folder of your Prep Builder installation directory and runs flows in the background using Java without ever opening Prep.
  • Credentials for Tableau Server, Tableau Online, and databases are stored in plain-text JSON files, which is fine for a personal laptop but not a secure or governed approach for production use.
  • Use -t to reference a flow file and -c to reference a connection credentials file; drag and drop paths into the command line to avoid typos.
  • For Tableau Online you must reference the specific pod URL and the site content URL rather than the generic online.tableau.com address.
  • Command-line flows can be scheduled via Windows Task Scheduler, and extra options exist for incremental refreshes, disabling validations, and debugging.

You can run Tableau Prep flows from the Windows command line without ever opening Prep Builder, which is a lightweight way to test basic automation before deciding whether something like the data management add-on is worth investing in.

Tim works through three scenarios: a local flow with local input and output, a local flow that publishes output to Tableau Online, and a flow that reads from a database and publishes a data source. Everything runs via a batch file in the Prep Builder installation folder.

The Breakdown
  1. Locate the CLI and your flow files 1:28

    The Tableau Prep CLI batch file lives in the script folder inside your Prep Builder installation directory, and it runs flows in the background using Java without opening the Prep interface. Before running anything you also need to know where your flow files and any credentials files are kept.

  2. Build a credentials JSON file 3:40

    Credentials for Tableau Server/Online and for databases are stored in a JSON file with a connections section and a database section. This must exist before you can run any flow that touches a server or database, since Prep isn't logging in interactively.

  3. Use the correct Online pod and content URL 4:01

    For Tableau Online you can't use the generic online.tableau.com address — you must reference the specific pod URL your instance runs on, plus the content URL (the short site identifier), otherwise the connection won't resolve.

  4. Treat plain-text credentials as a laptop-only trick 6:00

    Usernames and passwords sit in plain text in the JSON file, which is only acceptable if you're the sole person with access to the machine; for anything governed or production-grade, something like Prep Conductor in the data management add-on is the safer route.

  5. Open the command line and point it at the CLI 7:59

    Open a standard (non-admin) command prompt, cd into the script folder, and confirm the batch file runs. Dragging folders straight into the terminal window auto-fills the path and avoids typos, which is handy since you'll retype similar commands repeatedly.

  6. Run a simple local flow with -t 9:51

    Use -t followed by the path to your flow file to run a flow with local input and output; hitting enter fires it, and you can watch it validate, build a temp directory, then complete before checking the output folder.

  7. Add -c to publish to Tableau Online 12:58

    To publish output to Tableau Online, specify -c with your credentials file before -t with the flow path. Only give the credentials file the access it actually needs — reference just the online creds if no database access is required.

  8. Combine database input with server output 16:57

    When a flow pulls from a database and publishes to Tableau Online/Server, the credentials file needs both the database and server sections, and the CLI checks input, output and the flow itself in sequence before running — otherwise the logic is identical to the previous scenarios.

Worth Knowing
  • Credentials are stored in plain text, so this approach is only sensible on a personal machine you're the only one accessing, not for shared or production environments.
  • Command-line flows can be scheduled with Windows Task Scheduler for basic automation without needing the data management add-on.
  • Extra command options exist beyond what's demoed, including incremental refreshes, disabling validations, and debugging/help flags — worth checking Tableau's own documentation for the full list.
  • Older Tableau Prep versions need slightly different syntax; check the linked documentation if you're not on a version that supports this CLI approach directly.
Use It When

Reach for this when you want to test whether automating Prep flows would genuinely help your workflow, or need a quick personal-machine automation without paying for the data management add-on.

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.