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

Tableau release notes:

“You can run your flow from the command line to refresh your flow output instead of running the flow from Tableau Prep Builder. You can run one flow at a time using this method. This option is available on both Windows and Mac machines where Tableau Prep Builder is installed.”

In this video, I show you how to do this for three different scenarios.

Link to documentation referenced in this video: https://help.tableau.com/current/prep/en-us/prep\_run\_commandline.htm

  • 00:00 Intro.
  • 00:45 Three scenarios I’ll cover.
  • 1:26 Setting up  connection, logins & pre-requisites.
  • 7:55 1-Running a simple flow, inputs and outputs locally.
  • 12:00 Watch me get stumped .
  • 12:58 2-Simple flow but publishing to Tableau Server / online.
  • 16:57 3-Flow with database inputs and Server output.
  • 21:28 Command Options
  • 23:00 Running this on a Mac
  • 23:25 Outro