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.
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.