Yes, indeed you can.
In the Repository location, open the Logs subfolder, locate the file log.txt, and open it in a text editor. Scroll to the bottom of the file for the most recent entries. Look for an entry with the text "begin-query". The text following that is the query. The syntax and formatting may appear a little different than you expect, and it will vary depending on the data source, but it can be very useful to understand what is going on between Tableau and the data source.
Are you encountering a particular problem that we can help with?
Depending on the problem you are trying to solve, and the details you are looking for, you may also find Performance Recording helpful. Access that via Help->Settings and Performance->Start Performance Recording. Perform the action you are troubleshooting, then return to Help->Settings and Performance-> and stop Performance Recording. Tableau will then build a Tableau view with the data, showing various statistics, including the SQL query.
I hope that helps.
Thank you for the reply. I did try to do the above 2 steps but I am unable to get the SQL query. Is there a better way to extract the query so that I can copy and paste the same in SQL developer and run it ?
Can you post one of your log files? To keep it short, before launching Tableau, rename the log file, then launch Tableau, load the workbook in question and the view for which you want the SQL statement. Then close Tableau and attach the log file here.
I too facing same issue,
I want to get the query running behind the chart in tableau.
if you resolved your issue, please help me on the same.
Thanks in Advance
While not exactly using the log files, I created a quick “how-to” guide that pulls together how to export and then test the SQL:
Hopefully Tableau will make this process much simpler in the future!