How to use R, a Tableau connection to R and Calculated Fields to store and load the underlying data of a defined Tableau View in a Database or Text File (part 2 of 2)
Michael is the Managing Partner at Business Information Arts, Inc, Tableau Partner, Tableau Certified Consultant, Tableau Instructor and leader of the Toronto Tableau User Group. Last, but not least, Michael is the only person I know who is using Tableau Software since version 1.0.
The first part of this post walked you through the process of
- downloading and installing R and RStudio
- installing the required R packages,
- setting up the ODBC database connection
- writing the Calculated Fields in Tableau to read the underlying data of a Tableau view from a database
In the first part, we have only run SELECT queries, but we could also run INSERT, DELETE, UPDATE or INSERT INTO (Append data) queries – all we need to be is pass a valid SQL statement to a Calculated Field that establishes an ODBC connection to the Database and run the SQL statement.
Today’s second part of the post will
- show how to insert data of a Tableau view into a database
- demonstrate the necessity of aligning the orientation of the view and the Table Calculation
- show how to perform data definition queries
- provide the general caveats of the technique
- demonstrate an analysis technique that leverages multiple exports of a Tableau View based on the Superstore Dataset to SQL Server
- give some insights on performance and upper limits
- provide some useful links regarding the integration of Tableau and R