2 Replies Latest reply on Feb 7, 2013 11:01 AM by Tremain Keith

    Is there a way to modify the query that gets ran when tableau fetches data?

    Tremain Keith

      I'm knew to tableau, and I know you can view the query that get executed in the log file, but is there a way to manually modify the sql query so you can get the results you want. (e.g. changing what columns are included in the select statement). I'm not referring to the custom sql that you can write to join tables together. Thanks in advance for the help

        • 1. Re: Is there a way to modify the query that gets ran when tableau fetches data?
          Russell Christopher

          Hey Tremain -

           

          There isn't a way to do this. However, can you expand on your "why I want to do this" a little bit?

           

          You said: e.g. changing what columns are included in the select statement

           

          Why would this be helpful?

          • 2. Re: Is there a way to modify the query that gets ran when tableau fetches data?
            Tremain Keith

            Well I have created a Dashboard that uses 3 different sheets. All the sheet require the same data source, and the data is a join of 2 tables; one that logs Test Defects for an application and one the logs Prod. Incidents. They are joined together by an application_code. On one of the sheets I am recording the total Defects and Incidents for a each month, however because the tables are joined by the application_code if, for example, an application has 5 defects for January and 1 incident for January, search results display 5 rows of defect info (which is correct) but attaches that 1 incident that shares the application code to the five defects. This makes it seem as if there are 5 incidents, but it's really that 1 incident repeated 5 times.

             

            If I could choose the columns in the select statement, I could choose the columns that are related to the defects and do a sum of records to get the number of defects and choose the columns that are related to incidents and do a count distinct to get the sum incidents.

             

            I hope this makes sense.