1. Tableau Data Prep
  2. Tableau Data Prep Download

Enter an array for your input and output connections. Note: If using Tableau Prep Builder version 2018.2.2 through 2018.3.1, always include the 'inputConnections' and 'outputConnections' arrays even if the flow doesn't have remote connections for inputs or outputs. In Tableau Prep Builder: Open File Explorer or Finder and navigate to the directory for the files. Ctrl-click or Cmd-click (MacOS) to select the following files and drag-and-drop them onto the Flow pane to add them to your flow. (For file location, see Wrap up and resources.).

Match the skills of any data worker with the capabilities they need. Prepare, create, explore, or view trusted data with subscriptions to Tableau's governed self-service analytics platform. Upgrade to Tableau Creator, a subscription offering that gives you Tableau Desktop, Tableau Prep Builder, and a choice of Tableau Server or Tableau Online.

Note: The content in this topic only applies to Tableau Prep Builder.

Tableau Prep Public

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.

Note: If you use Single Sign-On authentication, running flows from the command line isn't available. You can run the flows from Tableau Prep Builder instead.

Connector limitations:

  • JDBC or ODBC connectors: Flows that include these connectors can be run from the command line starting in version 2019.2.3.
  • Cloud connectors: Flows that include cloud connectors, such as Google BigQuery, can't be run from the command line. Instead run the flow manually or run the flow on a schedule in Tableau Server or Tableau Online using Tableau Prep Conductor. For more information, see Keep Flow Data Fresh.

For Windows machines, you can also schedule this process using Windows Task Scheduler. For more information, see Task Scheduler(Link opens in a new window) in the Microsoft online help.

When you run flows from the command line, Tableau Prep Builder refreshes all outputs for the flow using the settings for the output steps specified in Tableau Prep Builder. For information about how to specify your output locations, see Create data extract files and published data sources(Link opens in a new window). For information about setting your write options (version 2020.2.1 and later), see Configure write options.

Before running the flow

To run the flow from the command line, you'll need administrator privileges on the machine where you are running the flow and you'll need the following information:

  • The path where Tableau Prep Builder is installed.

  • If connecting to databases and publishing output files to a server or a database (version 2020.3.1 and later) - create a credentials .json file that includes all required credentials.

  • The path where the Tableau Flow (.tfl) file is located.

Credentials .json file requirements

Note: Credentials .json files are not required if the flow connects to and outputs to local files, files stored on a network share or input files that use Windows Authentication (SSPI). For more information about Windows Authentication, see SSPI Model(Link opens in a new window) in the Microsoft online help.

Tableau Prep Builder uses information from the flow file and from the credentials .json file to run the flow when you have remote connections. For example, the database name for your remote connections and the project name for your output files come from the flow, and the server name and the sign in credentials come from the credentials .json file.

  • If you plan to reuse the file, place it in a folder where it won't be overwritten by the Tableau Prep Builder install process.
  • If you are running a flow that includes any of the following, you must include a.json file that includes the credentials that are required to connect.
    • Connects to database files or published data sources.
    • The output is published to a server or to a database (version 2020.3.1 and later).
    • The flow includes script steps for Rserve or TabPy. The .json file must include the credentials that are required to connect to these services. For more information, refer to the array requirements for your version below.
  • The credentials specified in your flow and the credentials included in your .json file must match, otherwise the flow will fail to run.
  • When you run the process, the hostname, port, and username are used to find the matching connection in the Tableau flow file (.tfl) and updated before running the process. Port ID and Site ID are optional if your connections don't require this information.
  • If connecting to a published data source, include hostname, contentUrl, and port (80 for http and 443 for https) in the input connections. The hostname is required to find the matching connection in the Tableau flow file (.tfl), and the contentUrl and port are used to establish the connection to the server.

  • If you connect to Tableau Online, include the port (80 or 443) in the input connections for the pod that you are connecting to. For more information about Tableau Online, see Tableau Bridge connections to Tableau Online(Link opens in a new window) in the Tableau Online help.

Depending on your Tableau Prep Builder version, your credential information may be formatted differently. Click on the tab below to view the credential format for your Tableau Prep Builder version.

Depending on your connections, include your server or database credentials or both. When your flow connects to and outputs to the same server or database, you only need to include a single block in the .json file. If you connect to a server or database that uses different credentials, use a comma delimited array.

Server connectionsDatabase connectionsRserver or Tableau Python connections

Connection block name: 'tableauServerConnections'

Include the following data in the array:

  • serverUrl (Server name)
  • contentUrl (Site ID. This appears after /site/ in the URL for Tableau Server or Tableau Online. For example 'https://my.server/#/site/mysite' set 'contentUrl': 'mysite'.))
  • port (Port ID)
  • username
  • password

Connection block name: 'databaseConnections'

Include the following data in the array:

  • hostname (Server name)
  • port (Port ID)
  • username
  • password

Only include this array if your flow includes script steps for R or TabPy.

Connection block name: 'extensions'

Include the following data in the array:

  • extensionName: Specify 'rSupport' or 'pythonSupport'
  • regular: Include 'host'and 'port'. You can also include 'username' or 'sslCertificate' (content of your public .pem file encoded as base64 string) if applicable.
  • sensitive: Include 'password' if you use one. Otherwise include a blank array.

Note: ContentUrl is always required in the .json file for sever connections. If connecting to a default site, for example 'https://my.server/#/site/', set ContentUrl to blank. For example 'contentUrl': '

Examples

This section shows different examples of credentials files that you can create using the credentials .json requirements.

Connecting to a server connection

This example shows a .json credentials file that connects to and outputs to a server connection that uses the same credentials:

Connecting to a server connection and output to a database connection

This example shows a .json credentials file that connects to a server connection and outputs to a database connection:

Flow includes Rserve and TabPy script connections and outputs to a database connection

This example shows a .json credentials file that includes Rserve and Tabpy credentials and outputs to a database connection:

Connecting to and outputting to different database connections

Tableau

This example shows a .json credentials file that connects to and outputs to different database connections:

Enter an array for your input and output connections.

Note: If using Tableau Prep Builder version 2018.2.2 through 2018.3.1, always include the 'inputConnections' and 'outputConnections' arrays even if the flow doesn't have remote connections for inputs or outputs. Just leave those arrays blank. If you are using Tableau Prep Builder version 2018.3.2 and later you don't need to include the blank arrays.

Input connections Output connections Rserver or Tableau Python connections
  • hostname (Server name)
  • contentUrl (Always required for published data sources. See Output connections for description.)
  • port (Port ID)
  • username
  • password
  • serverUrl
  • contentUrl (Site ID. This appears after /site/ in the URL for Tableau Server or tableau Online. For example 'https://my.server/#/site/mysite' set 'contentUrl': 'mysite'.)
  • username
  • password

Only include this array if your flow includes script steps for R or TabPy that require a password.

  • extensionName: Specify 'rSupport' or 'pythonSupport'
  • credentials: Include 'password' .

Examples

This section shows two different examples of credentials files that you can create using the credentials .json requirements.

Connecting to a published data source

This example shows a .json credentials file that connects to a published data source and outputs data to a server that includes a Site ID

Note: If the inputConnection or outputConnection uses the Default site, for example 'https://my.server/#/site/', set ContentUrl to blank. For example 'contentUrl': '

Connecting to two databases

This example shows a .json credentials file that connects to MySQL and Oracle and outputs data to a server that includes a Site ID.

Flow includes script steps for Rserve and TabPy and connects to a database

This example shows a .json credentials file that includes the password for Rserve and TabPy services and connects to MySQL.

Tips for creating your credentials file

To avoid errors when running the flow, make sure your credentials file follows these guidelines:

  • If using Tableau Prep Builder version 2018.2.2 through 2018.3.1, always include the 'inputConnections' and 'outputConnections' arrays even if the flow doesn't have remote connections for inputs or outputs. Just leave those arrays blank.

    If you are using Tableau Prep Builder version 2018.3.2 and later you don't need to include the blank array.

    • No remote input connection? Include this syntax at the top of the .json file

    • No remote output connection? Include this syntax at the bottom of the .json file

  • No port ID for your input connection or the port is specified as part of the server name.

    If there is no port ID for your connection, don't include the 'port':xxxx, reference in the .json file, not even 'port': '. If the port ID is included in the server name, include the port ID in the host name. For example 'hostname': 'mssql.example.lan,1234'

  • When referencing the 'serverUrl': don't include a '/' at the end of the address. For example, use this 'serverUrl': 'http://server' not this 'serverUrl': 'http://server/'.

  • If you have multiple input or output connections include the credentials for each one in the file.

  • If connecting to published data sources, make sure to include the hostname and contentUrl in the input connections.

Run the flow

Important: The examples below include the name change for 'Tableau Prep' version 2019.1.2 to 'Tableau Prep Builder'. If you are using an earlier version of the product use 'Tableau Prep' instead.

  1. Open the command prompt or terminal command prompt (MacOS) as an Administrator.

  2. Run one of the following commands using the syntax shown below.

    • The flow connects to local files or files stored on a network share and publishes to local files, files stored on a network share or uses Windows authentication:

      Note: If connecting to or outputting to files stored on a network share, use the UNC format for the path: serverpathfile name. It can't be password protected.

      Windows

      Mac

    • The flow connects to databases or publishes to a server:

      Windows

      Mac

    • The flow file or credentials file is stored on a network share (use the UNC format for the path: serverpathfile name):

      Windows

      Mac: Map the network share to /Volumes in Finder so that it is persistent, then use /Volumes/.../[your file] to specify the path:

For common errors and resolutions see Common errors when using the command line to run flows.

Run the flow with incremental refresh enabled (version 2020.2.1 and later)

If you don't have Tableau Prep Conductor enabled on your server to schedule your flow runs, you can run your flow using incremental refresh from the command line. Simply include the parameter --incrementalRefresh in your command line as shown in the example below.

Windows

Mac

If the input steps in your flow have incremental refresh enabled and the incremental refresh parameters are properly configured, Tableau Prep Builder will do the following:

  • All inputs in the flow that have incremental refresh enabled will run all corresponding outputs using incremental refresh.
  • If no input in the flow has incremental refresh enabled, all outputs will be run using full refresh. A message will show the refresh method details.
  • If some inputs in the flow have incremental refresh enabled, the corresponding outputs will run using incremental refresh. The other outputs will be run using full refresh and a message will show the refresh method details.

For more information about configuring flows to use incremental refresh, see Refresh Flow Data Using Incremental Refresh

Command options

If you want to view the help options, include -h in the command line.

Command optionsDescriptionNotes
-c , --connections <arg>The connection path to the credentials file.Requires the path to where the credentials file is located.
-d, --debugDebug the flow process.Include this option to view more information to help debug a problem with refreshing the flow. Log files are stored in: My Tableau Prep Builder RepositoryCommand Line RepositoryLogs
-dsv, --disableSslValidationDisable SSL validation (MacOS)When running flows using the command line on the MacOS, a dialog may show asking for the keychain user and password. Starting with Tableau Prep Builder version 2019.3.2, you can pass in this additional parameter to disable this keychain dialog. For example: /Applications/Tableau Prep Builder [Tableau Prep Builder version].app/Contents/scripts/./tableau-prep-cli -dsv -c path/to/[your credential file name].json -t path/to/[your flow file name].tfl
-h, --helpView the help for syntax options.

The help option or a syntax error shows the following information:

-inc, --incrementalRefreshRun incremental refresh for all outputs that are configured to use it.

Include this option to run incremental refresh for all inputs that are configured to use it. Incremental refresh enables Tableau Prep Builder to retrieve and process only new rows instead of all rows in a flow.

The incremental refresh configuration settings on the input steps determine which flow outputs can be run incrementally. All other outputs will be run using a full refresh and a message will show the refresh method details.

For more information about running flows using incremental refresh, see Refresh Flow Data Using Incremental Refresh .

-t, --tflFile <arg>The .tfl flow fileRequires the path to where the .tfl flow file is located.
Tableau

Syntax examples

The command lines below show four different examples for running a flow using the following criteria:

  • Tableau Prep Builder version: 2020.3.1

    Important: The examples below include the name change for Tableau Prep version 2019.1.2 to Tableau Prep Builder. If you are using an earlier version of the product use 'Tableau Prep' instead.

  • Flow name: Flow1.tfl

  • Flow location: C:UsersjsmithDocumentsMy Tableau Prep Builder RepositoryFlows

  • Credentials file name: Flow 1.json

  • Credentials file location: C:UsersjsmithDesktopFlow credentials

  • Credentials file location stored on a network share: tsi.lanfilesFlow credentials

The flow connects to and publishes to local files

Windows

Mac

The flow connects to and publishes to local files and uses the short form for incremental refresh

Windows

Mac

The flow connects to databases and publishes to a server

Windows

Mac

The flow publishes to a server and the credentials file is stored on a network share

Windows

Mac

Thanks for your feedback!

Tips & Tricks

Have you ever needed to do a little more in the way of data prep than what’s provided in the Tableau Data Source tab? If you are not a SQL expert, how do you do the prep required to make your data Tableau friendly? In the past, have you resorted to dumping data to a CSV file or Excel and using Excel for “cleaning” before bringing data into Tableau? What happens if you have multiple sources? Sure, some things can be done in Tableau Desktop using features such as cross-database joins and pivots, but it can be hard to generate repeatable steps that can be used to transform your data. And manual steps can be difficult to document and share with others. If these scenarios are painfully familiar to you, then Tableau Prep may be just what the (Tableau) doctor ordered.

Tableau Prep was announced under the name Project Maestro at the 2017 Tableau Conference and launched in April 2018. Under the new April 2018 licensing model, it comes with the Tableau Creator license (see Tableau Pricing). According to Tableau, “Tableau Prep will make it possible for more people, from IT to business users, to easily prep their data with a direct and visual approach.”

I recently had the chance to take part in the beta program for Tableau Prep/Project Maestro. While maybe not as fully featured as some ETL (extract, transformation and load) tools like Informatica and Alteryx, Tableau Prep has some nice features that should make life easier for relatively simple ETL scenarios.

Here’s a list of my 10 favorite features.

  1. Joining disparate data sources. For quite some time, one of Tableau’s strengths has been its ability to join multiple data sources. Tableau Desktop lets you combine sources by “joining” or “blending.” Similarly, Tableau Prep lets you combine an Oracle Table, a SQL Server table and a Microsoft Excel worksheet into one data source with just a couple of clicks.

    While some data prep can be done in Tableau Desktop’s data source tab, there are limitations to what can be done. The main differences between Tableau’s new Tableau Prep tool and data prep from within Tableau Desktopare in the presentation and in the number of options available.

    One such difference is that you can connect to 70 different data sources in Tableau Desktop and in the first production release of Tableau Prep, you can connect to 28 data sources. See below:

    Within Tableau Prep, you add connections to these sources. If the connection is a database, such as SQL Server, you specify the schema, the tables and which columns you want to bring in. Once you have your sources set up, you draw a line between them and add a join.

    This functionality is similar to the way other ETL tools do joins. It should be pointed out that doing these joins is often easier said than done. When not dealing with simple data like Tableau’s Sample Superstore, joins can be tricky. This is often due to differences in the level of detail, mismatched data, etc. But if you have a relatively simple scenario, joining disparate sources can be accomplished in Tableau Prep.

    NOTE: Currently, the initial selection of schemas and tables is not quite as intuitive as with some data sources such as Oracle. As with Tableau Desktop, I expect every subsequent release will see improvement in this area.

  2. Join and union results. With Tableau Desktop you can join data and union data. When doing a join or union in Tableau Desktop, the bottom of the Data Source tab will show your result. But often you want to see the results of what joined (given your join condition) AND what didn’t. In Tableau Prep, you get a Summary of Join Results that shows unmatched values. This feature can be useful for evaluating/debugging join conditions and for validating data.

    See the bottom right corner for an example of Summary Join Results.

  1. Preview in Tableau Desktop. After you have done a “step” to transform your data, you can use Preview in Tableau Desktop to look at the data in Tableau Desktop. This feature provides a quick way to validate the data produced by the step.
  2. Aggregate data. Tableau Desktop offers multiple ways to aggregate, or summarize, data. For example, you can create a Tableau extract and select Aggregate data for visible dimensions, or you can use sets or groups to aggregate data and summarizing into something like Total Sales by Region. But, if you just want a quick aggregation of your data to store in a data source or Tableau data extract (TDE), you can do this easily with Tableau Prep. You can add a step to aggregate and simply drag and drop your grouped fields and your aggregated fields. In the example below Discount, Profit, Quantity and Sales is grouped by Year of Sales, Region and City.
  3. Wildcard union. Sometimes you want to combine similar files into one data source (i.e. monthly sales files). In Tableau Desktop you can do a Union to accomplish this. Tableau Prep takes this to the next level by providing Wildcard Unions. With Wildcard Unions you specify a file path or directory and union all files that are in that location (irrelevant files can be excluded). You can then merge these files into one. The resulting merged file contains a File Paths column that contains the file path of the original source. When doing unions, you can also merge similar fields that have different names. See below for an example of a Wildcard Union:
  4. Pivot for database tables. In Tableau Desktop, you can pivot data in Excel or CSV files. If you want to re-structure, or pivot, data stored in a database such as SQL Server or Oracle, you have to create a new table or use custom SQL. In Tableau Prep, “pivot” appears to be a valid option for database tables.

    Below are examples of pivots using SQL Server and Oracle tables as data sources:

  5. Edit and clean data.This is big and has lots of use cases. Often when you bring data into Tableau, data integrity issues become apparent. Wouldn’t it be nice to quickly clean your data bringing it into Tableau? Let’s say most of your states were put in using a two-character capital abbreviation like AZ, but some states were fully spelled out. Ideally, you would fix data integrity issues at the source. But sometimes you just need a quick fix. With Tableau Prep you can now clean your data and edit values. See below for an example of edit values:
    In Tableau Prep, you can create one step that does multiple “cleaning” functions like filter, change data types, rename and remove fields. See below for a “Fix Dates” step that performs multiple functions:
  1. Group and replace. Let’s say you have the following values “USA,” “United States” and “U.S.A.” You know these are all USA and should be grouped together. Currently, you can group these in Tableau Desktop or fix your data at the source. With Tableau Prep you also have an option to Group andReplace, saving your new grouping as part of your data source.

    See below for an example (notice you even can do it by Pronunciation!):

  1. Data profile. In Tableau Desktop’s Data Source pane, row level data is displayed at the bottom of the screen, but you can’t see how the data is distributed. With Tableau Prep, the screen is divided into three panes: the top pane has a data flow or a graphical representation of the work flow, the middle pane has a data summary or profile and the bottom pane displays the row level data. The profile section in the middle has histograms to depict the frequency of values within columns, making it very easy to see how data is distributed.

    See below:

  1. Graphical depiction of steps taken to transform data. As you can see above, steps taken to transform the data are graphically depicted and put into one self-documenting flow. You can also click on any of the steps to see what the data looks like at any given stage of transformation. This is what more complex ETL tools have been doing for years and it is really useful. These steps can then be shared and run as a “flow,” which can be published as a Hyper, TDE or saved to a file.
CONCLUSION

Tableau Prep has some really good, time saving features that will allow you produce Tableau friendly data. It will be a good alternative to manually scrubbing data, using steps that often are not documented or repeatable. For simple transformation logic, Tableau Prep should do everything that is required. Even though Tableau Data Prep is good at creating Tableau Data Extracts and text-based files, often it can be better to build a database repository or data warehouse that can be leveraged by multiple reporting tools. For this type of work there are other ETL (extraction, transformation and load) tools that might better suit your needs. Tools such as Alteryx and Informatica have more data output options (i.e. database tables) and more capabilities when it comes to predictive modeling, statistical analysis, geospatial manipulation, mapping and valuable built-in demographic data for enhancing a dataset. At Senturus, we believe there is no one size fits all tool for data preparation. There is a 'right tool for the job' and we can help you determine what tool might best fit your needs.

It is a well known fact that data preparation is often 80% of the work when building out business analytics frameworks. For more complex data work, expert advice is often needed to make sense of the underlying data sources so they can be joined into a cohesive, well-designed data model that can be used by multiple reporting tools. At Senturus, we have been doing just that for nearly two decades. We make sense of what is complex by designing and building intuitive data structures that can be easily leveraged by tools such as Tableau.

This blog was submitted by our own Monica Van Loon. A frequent contributor to our blog, Monica is a Tableau certified consultant and teaches many of our Tableau workshops.

Tableau Data Prep

Senturus is a nationwide business analytics consulting firm and a Tableau partner. We were in no part solicited or paid for this review. The views and opinions expressed in this article are those of the author and do not necessarily reflect those of any other related party.

Data Prep

Tableau Data Prep Download

Related Pages

Coments are closed

Most Viewed Posts

  • Hero Wars Discord
  • Ups Track Order
  • Tableau Public Latest Version
  • Certificate P12 To Pem
  • Tableau Reader 2019.3

Scroll to top