Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see Tableau Custom SQL on server without downloading workbook?

Oftentimes I need to troubleshoot a workbook that another person at my company has created and published to our server. To troubleshoot, I need to see their connection details, specifically their Custom SQL, to understand what data they are using in their extract.

Is there any way to view this connection info (specifically their SQL code) when viewing the published workbook on the server (web) version?

I am an admin and I am able to download their workbook to my desktop version of tableau, then open it, then reconnect to the data, then look through the data connections they created, to see their SQL. But it's a really cumbersome process.

All I'm looking to do is, when looking at a published workbook, see the data connection details so that I can see the Custom SQL, without going through the process of downloading I described above.

like image 326
Rick LaPointe Avatar asked Oct 21 '22 06:10

Rick LaPointe


1 Answers

You can get some details on the SQL statement by creating a performance recording.

From the Tableau Server Admin Guide:

Enable Performance Recordings:

  1. Choose the Admin button in Tableau Server.
  2. Choose Site.
  3. Select a site.
  4. Choose Edit.
  5. In the Edit Site dialog box, select Allow Performance Recording.
  6. Choose OK.

You start performance recording for a specific view by adding ?:record_performance=yes to the url. For example: http://server.site.com/views/Variety/BaseballStatistics?:record_performance=yes

Now, notice a new link at the top of your view called "Show Performance Recording". Click this to open the generated performance workbook dashboard. Click on the bar chart and observe the SQL appear at the bottom of the view. Note, the SQL text will truncate after about 250 characters.

The admin guide suggests viewing the "Tableau Log" to find the full SQL statement.. I have looked at all the server side logs in C:\ProgramData\Tableau\Tableau Server\data\tabsvc\logs but cannot locate the SQL. (please reply if you know where to find this?)

You can also run a database trace to see the SQL that the database sees. For example, for MS SQL Server, run the Profiler tool, setup a default trace, and filter on "Application Name" = "Tableau Protocol Server 8.0" or similar.

like image 122
Rob McCauley Avatar answered Oct 24 '22 05:10

Rob McCauley