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

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2020-10-27
- **Format:** Video · 24 min watch · transcript available
- **Topics:** Data prep, Productivity
- **Tools:** Tableau (cloud, prep, server)
- **Canonical:** https://just-tim.com/posts/how-to-run-tableau-prep-flows-in-the-command-line-2020-3-later
- **Watch:** https://youtu.be/ZMIQFWnrqV8

I show you how to run Tableau Prep flows from the Windows command line in version 2020.3 and later, covering three automation scenarios: a simple local flow, publishing output to Tableau Online, and pulling from a database to publish a data source. I walk through the setup, credential JSON files, and the command syntax involved.

## Key takeaways

- 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.

## Chapters

- 0:47 Three automation scenarios
- 1:28 Locating the Prep CLI and flows
- 3:40 Anatomy of the credentials JSON file
- 7:59 Opening and navigating the command line
- 9:51 Running a simple local flow
- 12:58 Publishing output to Tableau Online
- 16:57 Database input to published data source
- 19:53 Documentation and command options

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/how-to-run-tableau-prep-flows-in-the-command-line-2020-3-later

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
