-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Tableau Prep Cookbook
By :

When Tableau Prep was launched, it was only able to output data to files, including hyper extracts. Thankfully, Tableau introduced functionality to write to external databases in release 2020.3. With it, you can write the output of your flow directly to a database.
At the time of writing, the supported output types are SQL Server, Oracle, PostgreSQL, MySQL, Teradata, Snowflake, and Amazon Redshift.
In this recipe, we'll write data to SQL Server. You can write to any of the supported types listed previously. Ensure that you have the appropriate database details and write privileges before you continue.
To get started, open up Tableau Prep Builder and open the Superstore sample flow from the home screen, then follow these steps:
Figure 2.34 – Removing a step from a flow
Figure 2.35 – Output configuration options
Figure 2.36 – Changing the output type
Doing so will raise an error. This is expected, as the new output location has no default configuration and therefore the flow wouldn't work if we were to run it now. As we configure the connection, the error will disappear:
Figure 2.37 – Incomplete output configurations cause an error
Figure 2.38 – Use [schema].[table] format to create a new table
Figure 2.39 – Table refresh options
Figure 2.40 – Output successfully written to database
Figure 2.41 – Verifying the output in the database
Using the steps in this recipe, you have learned how to write data from Tableau Prep to a database.
Using the Output tool, you can write data to a variety of database platforms. Doing so can add significant value to your use of Tableau Prep and allow you to prepare data for use with tools outside the Tableau ecosystem.