3 Replies Latest reply on Jan 24, 2019 3:29 PM by shawkins

    QueryParserException for Temporary Table query with Tableau Dessktop client

    aormerod

      I'm trying to explore using Teiid (version 11.2.1) with Tableau (version 10.4.x currently) and am essentially using the example at teiid-embedded-examples/restservice-as-a-datasource at master · teiid/teiid-embedded-examples · GitHub  but with the ODBC transport / connector enabled for incoming connections.

       

      It seems to work in a quick test, however I'm getting a stack trace of the below on the console

      org.teiid.api.exception.query.QueryParserException: TEIID31100 Parsing error: Encountered "SELECT * INTO [*]TEMPORARY[*] TABLE \"#Tableau_39_1_Connect\"" at line 3, column 6.

      Was expecting: id

       

      Is this a known issue with Tableau clients, or is there any Teiid options I can set to enable it to parse this query?  (It seems to be the double quotes and # on the temporary table name that's causing the issue)

       

      Thanks for any help / pointers.  New to Teiid, so let me know if any additional information would be helpful or obvious things I can try.

       

      Thanks,

        • 1. Re: QueryParserException for Temporary Table query with Tableau Dessktop client
          shawkins

          > Is this a known issue with Tableau clients, or is there any Teiid options I can set to enable it to parse this query?  (It seems to be the double quotes and # on the temporary table name that's causing the issue)

           

          I don't think this is a known issue.  Teiid does support a select into statement, but it's of the form "select ... into tbl from ...", which is equivalent to "insert into tbl select ... from ..."

           

          It looks like this is Vertica syntax.  Do you have any options for controlling the insert syntax?

           

           

           

          • 2. Re: QueryParserException for Temporary Table query with Tableau Dessktop client
            aormerod

            Thanks for the reply.

             

            I just realized my error.   The above error occurs when using the default / native Postgres connection in Tableau rather then the generic ODBC connection with the Postgres driver. (It looks like it's the SQL they use for checking the connection health)

             

            Now when it connects (with generic ODBC)  I don't get the original error on the console and I get Tableau advising the unsupported DB functions that have been reported elsewhere (e.g. The date part named 'week'  for the date function: DATEDIFF(date_part, date,  [start_of_week]))

             

            Do you happen to know if there are plans to support these remaining functions? Or an issue tracker if should follow?  (the one I found was closed out for some of missing operations having been implemented)

             

            Thanks

            • 3. Re: QueryParserException for Temporary Table query with Tableau Dessktop client
              shawkins

              > Do you happen to know if there are plans to support these remaining functions? Or an issue tracker if should follow?

               

              I see that the select into with TEMPORARY TABLE is now also supported by postgres, so we can add support for that as well.

               

              Support for pg / ODBC functions has been added as needed by specific clients / tools.  There are generally teiid equivalents, so it's just a matter of identifying what is needed and adding the appropriate aliasing.  If you can open an issue for what you need, that would be great.