Tableau Prep Workflow Automation Made Simple

Data

Tableau Prep Workflow Automation Made Simple

So, you have this dashboard. It’s a super cool dashboard. You’ve also got an elaborate Tableau Prep workflow to feed your dashboard. Unfortunately, time didn’t stop as soon as you finished this project. And with time, comes more data. So, you must go back to Tableau Prep, log in to all the servers you’re getting the data from and the server you’re publishing the data to, then run the entire workflow again. Every day. Or … do you?

Automating Tableau Prep Workflows

Tableau Prep allows for command line output refresh. If you’re unsure about whether to be excited or not, you should be. This feature allows you to automagically run your Tableau Prep workflow on a regular basis.

It is also important to note that Tableau recently announced the coming of Tableau Prep Conductor, which is currently in beta testing. Conductor will be an add-on product that allows for consistently delivered prepared data on a larger scale than the solution provided below. However, until Tableau Prep Conductor becomes available, here’s how you can automate your workflows in three easy steps:

  1. Create a credentials .json file
  2. Create a batch file to run the workflow
  3. Use Task Scheduler to run the workflow on a regular basis

These three steps might sound easy if you have previously created a .json file and a batch file and worked with Task Scheduler before. I had done approximately zero of these things prior to this task, so I will attempt to write the article I wish I’d had at the time.

Step 1: Creating a Credentials .json File

Copy and paste the code below into Notepad:

{
"inputConnections":[
  {
    "username": "user",
    "hostname":"mssql.hostname.lan",
    "port":1234,
    "password": "secret_password"
  },
],
"outputConnections":[
  {
    "serverUrl":"http://yourServer",
    "contentUrl":"site_name",
    "username":"user",
    "password":"Secret_password”
  }
]
}

 

You will need to replace the credentials in blue italics with your own. Once you’ve replaced the necessary information, you then must save your file as a .json file. To do this, you must select Save as, then at the bottom, change the file type to All Files. Give it a file name, with the extension .json at the end of the file. Your Save as dialogue box should look like this:

automating workflows for Tableau Prep

Hit save and you have completed the first step!

Step 2: Create a Batch File to Run the Workflow

First, you need to give Task Scheduler a file to run that contains the code for what you want to do. In this case, you need to make the file that tells Prep who you are and to run the workflow. To do this, you must create a batch file. There are three things you will need to create this batch file:

  • The file path to Tableau Prep
  • The file path to your Tableau Prep workflow
  • The file path to your credentials JSON we made in step one

To find the file path, you must right click on the file/application and select Properties. These paths will need to be placed in the batch file you create.

Next, copy the code below and paste it into a new instance of Notepad:

"<File Path to Tableau Prep>\scripts"\tableau-prep-cli.bat -c "<File Path to credentials JSON>.json" -t "<File Path to your Workflow>.tfl"

 

Then replace the objects in blue italics with the corresponding information. When you’re done, it should look something like this:

automating workflows for Tableau Prep

Next, save this as a batch file. This is similar to what we did in step one, but instead of the extension being .json, this time it will be .bat:

automating workflows for Tableau Prep

Once you save, you’re two-thirds of the way done!

Step 3: Use Task Scheduler to Run the Batch File Regularly

Use your computer’s search feature in the bottom-left corner of your screen to search for Task Scheduler.

It should take you to the Task Scheduler where you should select Create Basic Task:

create basic task in task scheduler

Then give it a name and description:

basic task description in task scheduler

Next, select how often you would like the flow to be run:

basic task in task scheduler task trigger

Choose the time of day:

basic task in task scheduler time of day trigger

Then hit Next and select Start a Program:

basic task wizard in task scheduler

Select Browse and navigate to the batch file we made at the end of step two:

browse to batch file to automate workflow in Tableau Prep

Hit Next, ensure everything looks good, then finish. Sit back, relax, and watch your workflows run like magic.

More About the Author

Danny Steinmetz

Analytics Consultant
Tableau Prep Workflow Automation Made Simple So, you have this dashboard. It’s a super cool dashboard. You’ve also got an elaborate Tableau Prep workflow to feed your dashboard. ...
Advance with Assist: Using Custom Backgrounds with Polygon Shapefiles You have a shapefile. You have a custom background. They belong together. Now it’s just a matter of figuring out how to make it work in ...

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

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072