2 Replies Latest reply on Jan 10, 2018 11:44 AM by Avinash Deshpande

    suppress casting in the odbc connection

    Gowtham P



      I am using a new database Parstream using a ODBC connection. The database uses Postgres SQL ODBC drivers to connect with it. When the connection is working, the tableau is using a casting method it seems. For example "TableauSQL"."Div4WheelsOff"AS VARCHAR(100)) . The following error message is returned. Can we do supress this internal casting functionality ?


      !! EXCEPTION in
      :: parstream::MutableCalcInstructionsPtr
      std::string&), line 1011 :
            ERR0 Expression parsing failed at:
      ("TableauSQL"."Div4WheelsOff"AS VARCHAR(100))
      Error while executing the query


      Thanks in Advance.


      Best Regards


        • 1. Re: suppress casting in the odbc connection
          Robert Morton

          Hi Gowtham,


          The CAST expression is a fundamental part of the SQL standard and you cannot suppress it entirely from the queries Tableau generates. This sounds like it may be a problem with the ParStream SQL parser, and I encourage you to report it to their technical support team.


          On a related note, I have seen a few other issues reported that involved seemingly unnecessary casts of a string type to a VARCHAR(100), and I believe that this problem is currently being investigated. Once addressed you may no longer see this particular query expression, however you may continue having problems with ParStream if it is unable to handle the CAST syntax Tableau may use in other circumstances.



          • 2. Re: suppress casting in the odbc connection
            Avinash Deshpande

            Hi Robert:


            We are using Generic ODBC driver with Denodo and Snowflake as the backend. The query always does a CAST(String column VARCHAR(100)), this works fine in Redshift but throws an error in Snowflake since the values in the column are more than 100 characters and the CAST does not work.


            What are our options? Snowflake says this is not an ANSI SQL implementation.


            Appreciate your help.