Viewing underlying SQL Queries in Tableau provides two options:

  1. Create a Performance Recording to record performance information about the main events you interact with workbook. Users can view the performance metrics in a workbook created by Tableau.

Help> Settings and Performance> Start Performance Recording

Help> Setting and Performance > Stop Performance Recording

2. Reviewing the Tableau Desktop Logs located at C:\Users\\My Documents\My Tableau Repository. For live connection to data source, you can check log.txt and tabprotosrv.txt files. For an extract, check tdeserver.txt file.