google / zetasql

ZetaSQL - Analyzer Framework for SQL
Apache License 2.0
2.28k stars 214 forks source link

How to get DDL/DML SQL type without catalog? #129

Open ChariotChai opened 1 year ago

ChariotChai commented 1 year ago

Hi team, I've known about how to extract table names from SQL. And I wonder could I get the SQL type (a create table statement/ a drop table statement/...) without catalog. For when I extract table names without setSupportsAllStatementKinds, it throws exception that com.google.zetasql.SqlException: Statement not supported: CreateTableStatement, so I think maybe the SQL statement type could be got without catalog. Thanks in advance.