1 Reply Latest reply on Feb 4, 2012 9:31 PM by Robert Morton

    Proper SQL syntax for Custom / Initial SQL - Teradata

    John Cantu


      Is there documentation available that identifies acceptable SQL syntax when using Custom SQL or the "Initial SQL" option when establishing a Teradata connection? We have discovered that comments, a semi-colon, or even extra spaces between filters (still testing), will causing errors.


      Any feedback is appreciated.


      Thanks in advance,


        • 1. Re: Proper SQL syntax for Custom / Initial SQL - Teradata
          Robert Morton

          Hi John,


          Initial SQL and Custom SQL are very different in nature. For other readers, please note that these features are not available for all data connections.


          Custom SQL allows you to define a SELECT statement whose resultset provides the data used by your connection. Since the Custom SQL statement must be a single query that generates a resultset, you may not use multiple statements or queries which attempt to create tables, insert records, or any other form of DDL.


          Initial SQL supports multiple statements and is not expected to yield a resultset. You must separate each statement with semicolon as the last character before a newline. These statements can perform arbitrary DDL operations, for example creating and populating a temporary table which you can then use as a single-table connection in Tableau. For those concerned about security, Tableau is still restricted to performing operations for which the user account has permissions. Furthermore, you can request a license for Tableau Desktop which prohibits the use of Initial SQL, and you can configure Tableau Server (or similarly request a license) to block the use of Initial SQL there.


          Does this help?