1 Reply Latest reply on Mar 1, 2013 12:06 PM by Robert Morton

    How to stop Tabelau not to executing unwanted custom query

    chandrashekhar vastrad

      Hi ,

       

      By default Tableau is running following queries for Custom Query  

      [Q 1]

      SELECT    *  FROM     (

                                                   SELECT       *       FROM  test

             ) TableauSQL LIMIT 1

      [Q 2]

      SELECT     *   FROM     TableauSQL LIMIT 1

       

       

      Why I am getting the table name as “TableauSQL” in the above query instead of my table name.

       

        <customizations>

          <customization name="CAP_SUPPRESS_DISCOVERY_QUERIES" value="yes"/>

          <customization name='CAP_CREATE_TEMP_TABLES' value='no' />

          <customization name='SQL_AGGREGATE_FUNCTIONS' value='127' />  </customizations>

        </customizations>

       

      Is there any changes I need to do or add something in the above list?

        • 1. Re: How to stop Tabelau not to executing unwanted custom query
          Robert Morton

          Hi Chandrashekhar,

           

          Tableau must wrap all Custom SQL connection queries as a subquery. This is necessary to avoid collisions between the clauses generated in Tableau queries and the clauses expressed directly in the Custom SQL connection (e.g. clauses like WHERE, GROUP BY, and HAVING that can only be expressed once per SELECT clause and may require coordinating with the expressions in the SELECT list).

           

          Try using a single-table connection to your table "test" instead of using Custom SQL.

           

          -Robert