You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we have been using zetasql analyzer to validate our generated sql statement for BigQuery. Recently we have decided to generate multi-statement sql like:
BEGIN
CREATE TEMP TABLE TempTable1(columnName STRING) AS select columnName from projectId.dataset.tableName where (((partitionColumn >= '2022-12-31') and (partitionColumn < '2023-01-03')) and ((localDatetimeColumn >= '2023-1-1') and (localDatetimeColumn < '2023-1-2')));
CREATE TEMP TABLE TempTable2(columnName STRING) AS select columnName from TempTable1 where (upper(CompanyGuid) in ('COMPANYGUID') and GroupId in ('groupId'));
select columnName from TempTable2 where DeviceId in ('deviceId') limit 1;
END
But we failed to validate the above statement with zetasql with following config:
LanguageOptions languageOptions = new LanguageOptions();
languageOptions.supportsStatementKind(ZetaSQLResolvedNodeKind.ResolvedNodeKind.RESOLVED_QUERY_STMT);
languageOptions.supportsStatementKind(ZetaSQLResolvedNodeKind.ResolvedNodeKind.RESOLVED_CREATE_TABLE_AS_SELECT_STMT);
languageOptions.enableMaximumLanguageFeatures();
AnalyzerOptions analyzerOptions = new AnalyzerOptions();
analyzerOptions.setLanguageOptions(languageOptions);
Analyzer.extractTableNamesFromScript(sql, analyzerOptions);
I am wondering if anyone could advise? Thanks!
The text was updated successfully, but these errors were encountered:
Hi, we have been using zetasql analyzer to validate our generated sql statement for BigQuery. Recently we have decided to generate multi-statement sql like:
But we failed to validate the above statement with zetasql with following config:
I am wondering if anyone could advise? Thanks!
The text was updated successfully, but these errors were encountered: