Leverage PowerShell and Tableau to Extract Server Datasources

Data

Leverage PowerShell and Tableau to Extract Server Datasources

by Mike Roberts
//

Question:

Of all the workbooks on Tableau Server, which (1) use a Tableau Server data source and (2) what workbook(s) use them?

Answer:

Since there’s no simple and straightforward way to extract this information from the default views on Tableau Server (_datasources, etc.), we’ll use a short and sweet PowerShell script to do the heavy lifting for us.

Since each Tableau workbook contains all the information about connections, calculations, etc., we’ll use our script to run through each of them and extract the information we need.

Step 1:
Pull down the attached PowerShell script and update the $input_path and $output_file variables to your specific requirements (where are your Tableau workbooks and where do you want the results to go, respectively). Save this file as a ‘.ps1’ file and save to the desired path.

Step 2:
Open Windows PowerShell (Windows + R) and type “powershell”.  Navigate to the directory where you saved the file from Step 1.

powershell

Step 3:
Run the script by typing: ‘ .{your file name}.ps1 ‘ Note: You may have to make sure you are able to execute these scripts. Check here: http://technet.microsoft.com/en-us/library/ee176949.aspx

$input_path = ‘c:UsersmrobertsDocumentsMy Tableau RepositoryWorkbooks*.twb’
  $output_file = ‘c:usersmrobertsdata.csv’
  $regex = ‘(?

Step 4:
You now have a listing of all your workbooks that use a Tableau Server data source.

More About the Author

Mike Roberts

Business Intelligence Consultant
Monitor Your Tableau Server without the GUI If you enjoy monitoring your Tableau Server cluster by constantly refreshing the admin view (image below), this might be for you. ...
InterWorks and Facebook to Share Insights on Data Culture at 2013 Tableau Customer Conference STILLWATER, Okla. – InterWorks, Tableau Software’s largest global services provider, announced plans to present alongside Facebook ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!