Quantcast
Channel: InterWorks
Viewing all articles
Browse latest Browse all 2697

Using Automated Workflows in Tableau Prep

$
0
0

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!

The post Using Automated Workflows in Tableau Prep appeared first on InterWorks.


Viewing all articles
Browse latest Browse all 2697

Trending Articles