Search code examples
google-bigquerytalend

How can I specify Standard SQL in a Talend tBigQueryInput query?


I have tried specifying standard SQL using a query prefix with this syntax but Bigquery seems to ignore the directive:

"#standardSQL  \r\n
select column1 from `mydataset.myview`"

but I get this error:

Running Query : #standardSQL  
select column1 from mydataset.myview
---> Reason: invalidQuery
Message: Cannot reference a SQL view in a Legacy SQL query.

Solution

  • I got this to work by removing the space between "#standardSQL and \r\n.

    Works:

    "#standardSQL\r\n
    

    Doesn't work:

    "#standardSQL \r\n
    

    RTFM:

    "Must be separated from the query by a newline character"
    

    My update to the FM:

    "Must be separated from the query by ONLY a newline character"