Rajesh,

I am not very familiar with Snowflake but I think you need to extend Babel parser[1] to support Teradata Database's syntax first (also don't forget to specify Calcite JDBC property "parserFactory=org.apache.calcite.sql.parser.babel.SqlBabelParserImpl#FACTORY" to make sure the Babel parser is used). If you would like to use Calcite JDBC adapter (see example[2]) to connect to Snowflake, you should add Snowflake dialect support for Calcite. Maybe we don't have enough tutorials so far, but as an example you can have a look at a recent Git commit[3] about adding a dialect for Spark.

Best,
Hongze


[1] https://github.com/apache/calcite/tree/master/babel/src/main
[2] https://github.com/apache/calcite/blob/72e952d1a79ee2d7ba05de88cbc2ac11f65cd879/core/src/main/java/org/apache/calcite/adapter/jdbc/JdbcSchema.java#L472-L496 [3] https://github.com/apache/calcite/commit/8eb852039db04c132ae7a99943495f87cf39dfd2

------ Original Message ------
From: "Rajeshkumar R" <[email protected]>
To: [email protected]
Sent: 2019/4/9 20:12:38
Subject: Snowflake Support

Hello

I would like to add snowflake dialect support to sqlparser in calcite. The
objective is to convert Teradata queries to snowflake dialect. Could you
please guide me to achieve this?

Thanks
Rajesh

Reply via email to