Using Automated Workflows in Tableau Prep

Data

Using Automated Workflows in Tableau Prep

I’m a big fan of Tableau Prep. In the same way that Tableau was introduced to bring data visualisation to the masses, Tableau Prep is trying to bring data preparation to the desks of analysts around the world. Its Tableau-esque layout and colour coding, coupled with a familiar approach to creating calculated fields, makes it easy for Tableau users of all skill levels.

As soon as Tableau Prep came out, there was demand for a Tableau Prep server to be used to manage workflows in an organization, but while we wait (Tableau Conference 2018 maybe!?), Tableau has released an Easter egg to help us with our data orchestration.

Welcome to Automated Workflows

This can be very handy when paired with scheduling software such as UC4 or the Windows default task scheduler. The idea is that you can automate the run of workflows to local files or for publishing to Tableau Server directly. Here’s how you can set it up.

You’ll need:

  • Tableau Prep workflow
  • Credentials file (more on this later)

When running workflows to local files, this couldn’t be easier:

Run command prompt and CD into desired directory ..\..Tableau\Tableau Prep 2018.x\scripts

Inside, there’s a .bat file called tableau-prep-cli.bat, which is the key ingredient for this to work.Tableau Prep workflow

Just use -t path to your workflow and run. It shouldn’t take too long.

Tableau prep workflow

To publish directly to Tableau Server—typically the most common route, especially if pushing data sources for others to use—we need a credentials file. This is a JSON file with the following format:

{

"inputConnections":[

],

"outputConnections":[

{

"serverUrl":"https://yourserver",

"contentUrl":"site_name",

"username":"user",

"password":"yourpassword"

}

]

}

Tableau Prep workflow

In my example, my data is coming from flat files that don’t need credentials. However, if you were connected to MS-SQL, you’d need to add input connections, as in the example below:

"username": "user",

"hostname":"hostname",

"password": "thisisapassword"

 

Start Scheduling!

Simple, right? Hopefully, this means that you no longer need to log in at 6am to run the workflow before everyone gets in the office and looks at the dashboard. 😊

Finally, if you need to debug Tableau Prep, just add -d to your command line.

We hope you find this useful, and if you attend the Tableau Conference in New Orleans at the end of October, we look forward to catching up with you!

More About the Author

David Pires

Senior Analytics Consultant
Using Automated Workflows in Tableau Prep I’m a big fan of Tableau Prep. In the same way that Tableau was introduced to bring data visualisation to the masses, Tableau Prep is ...
Tableau Quick Tip: Top N and Bottom N Filters For anyone attending a Tableau training on the second day, we will often teach how to create a Top N filter. This is a very commonly ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK