1 Reply Latest reply on Feb 22, 2017 2:39 PM by Patrick A Van Der Hyde

    Preventing Tableau from wrapping Custom SQL into a Select Statement

    Syed Zafar Naqvi

      I am connecting my Tableau workbook to Spark 1.6.2 (custom Sql query) using Microsoft Spark ODBC driver (its not a driver issue as this behaviour is same on SImba's Spark ODBC driver as well).

       

      Spark SQL 1.6.2 follows a subset of SQL 92  standard and does not allow SUB QUERIES; my problem is that when i try to create an extract of my data source which is a custom sql query, Tableau (SOMETIMES) wraps the custom sql query into a select statement of its own; which obviously fails on the server end as custom sqls are not supported over there.

       

      SOMETIMES however, Tableau will NOT wrap the query up and goes on creating an extract (I can see the query that executes on the server end so I know that at times it's a wrapped query and at times it's not!). I am trying to nail the scenario that causes OR prevents Tableau from following one behaviour or another. Any thoughts welcome!

        • 1. Re: Preventing Tableau from wrapping Custom SQL into a Select Statement
          Patrick A Van Der Hyde

          Hello Syed, 

           

          Interesting use case where you do not see that select statement because in asking around, I believe that all requests should always be wrapped in a select statement.  This is to prevent Tableau from being used to do harm (insert, drop, delete, etc.. type calls).   Initial SQL is possible to use in some instances to work around this.  Here is the information about this for you to determine if it is appropriate.   Run Initial SQL 

           

          I hope that helps

           

          Patrick

           

           

          Please mark my answer correct if this resolved the issue or mark it helpful below if it merely helped you.  This enables others to locate this post and reply for similar issues when searching. 

          2 of 2 people found this helpful