Custom Template to interact with Databricks SQL

63 views
Skip to first unread message

Vamseekrishna

unread,
Apr 12, 2022, 7:11:30 AM4/12/22
to Querydsl
Hello Team,


I am using QUERYDSL (latest) for databricks SQL. So there are some issues with SQL syntax with databricks SQL.


Below are some examples:

in SQLSERVER we have OFFSET and LIMIT for pagination
but in Databricks we don't have OFFSET. we have ONLY LIMIT.


similarly Databricks SQL is using current_date() to get today's date but SQL Server uses getDate().

as of now I see these two differences between SQLServer and Databricks SQL.

Currently I am using SQLServer2012 Template in queryDSL for SQLDialect.

In order to overcome above Issues I think I will have to write a new Template just like SQLServer2012Template, MySQLTemplate etc, a new DatabricksSQLTemplate may be required.

This is my analysis so far, so I need direction on which classes to override and implement in queryDSL so I can write my own QUERYDSL template to interact with Databricks SQL.

Please provide the help and guidance.


Thanks and Regards
Vamsee

Reply all
Reply to author
Forward
0 new messages