Knowledgeintelligence



This document will be used to demonstrate a solution to TWO situations.

1. We want to use a data table to SECURE data to select users

2. We want to pull multiple data sources into CSV files, and, process them in Tableau Desktop

The issue: Sometimes, we have data from two (or more) different data sources where we need data from each of those data source in a single Tableau visualization. In the current release (5.2) of Tableau, this is not possible. Note this will change in version 6.0, due 2010-Q4.

The solution: Assuming the data sources are small enough, we can pull data from each of the sources, and, export the extracted data as CSV files. Tableau can be used for this process. We need to place all the needed CSV files in a single Windows folder (directory). From there, we can use Tableau Desktop to connect to the data and treat each CSV file as a different table, in a single database.

Example problem: We will use the Tableau supplied Excel (Superstore) data, and, and, another Excel file, containing security data, as the other. The Excel file Looks like this:

|Geography |User |

|East |Joe |

|South |Bill |

|Central |Bob |

|West |admin |

NOTE: we are using two different Excel file. This will work wth data from ANY two (or more) sources.

Step#1. Connect Tableau to the sample Excel (Superstore) data.

Step#2. Build visualization that contains a single dimension and a single measure, insuring that ALL data rows are represented. [pic]

Step#3. Right Click on any bar and click on “Select All”. Ricght Click on that bar, again, and select “View Data…”.[pic]

Step 4. Click Select All, then click on Copy to Clipboard. Paste the data into Excel. [pic]

Step 5. Save the data as a CSV file, to a new Windows folder (directory). [pic]

Step 6. REPEAT STEPS 1-5 for the Excel Security data.

Step 7. At this point, there should be two CSV files in the directory where you just saved the data from Excel and Access. [pic]

Step 8. Starting a new Tableau Desktop Session. Open a new data source, choosing “Text File” [pic]

Step 9. Browse to the directory containing the CSV files, and, select one. [pic]

Step 10. Click on the Radio Button “Multiple Tables” and click on “Add New Table…”.[pic]

Step 11. Now, we need to establish a JOIN between the two data files. In this situation, the REGION, from the Excel Supoerstore data, and, the GEOGRAPHY column, from the Security data, will be used to join the two tables. [pic]

Step 12. Click on Geography, Region, then, the Add button to create the JOIN. Then, click on the OK button, to accept the join.

Step 13. At this point, you may be provided with an option to create an EXTRACT. Select YES. [pic]

Step 14. On the next screen, click on Extract, then, accept the default location for the extract. Tableau will pull all the data from the CSV files and create a mini data mart, from that data, in a Firebird database, on your local machine.

Step 15. You will be left with the two “Tables” (Superstore and Security) shown as one completely joined dataset. NOTE the geography and Region are matched in the short viz shown…[pic]

Step 16. NOW, let’s add something NEW. Let’s secure the data so that each individual, as the try to access the data, only sees what they are supposed to see. In THIS case, I am showing (security CSV file) that the user “admin” should only see “West” data….

a. We need to create a calculated field that returns TRUE if the data matches the signed on user, otherwise returns FALSE. That calculated field is: [pic]

The [User] field is from the security.csv file. The USERNAME() is a Tableau function, returning the signed on user name. When they match, the returned value is TRUE.

b. We put the calculated field on the Filter shelf and see Ture / False possibilities. We check the “True”. [pic]

c. When we select OK, the data will be limited to just the West… [pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download

To fulfill the demand for quickly locating and searching documents.

It is intelligent file search solution for home and business.

Literature Lottery

Related searches