Hello All,

I have just heard of Apache Calcite and was exploring the possibilities. I
wish to achieve the following, and wanted to check if my hunch is correct:
- Use a template to build SQL queries, like use jinja-sql or even pebble
(interpret the SqlNode tree kind of structure from my template and then add
the necessary fields like table name and group by fields from an input)

So what I am expecting is "SELECT ? FROM ? WHERE ?" would be inside a query
template (in Jinja-sql it may look like "SELECT {{select_fields | sqlsafe}}
FROM {{table_name | sqlsafe}} WHERE {{where_clause | sqlsafe}}" and values
like 'select_fields' would be substituted at run-time from a processing
engine like https://pypi.org/project/Jinja2/, but for Java) and the output
would be "SELECT col1 FROM table1 WHERE col1 IS NOT NULL" with some dialect
(like Snowflake or Big-Query).

Is this possible? Any recommendations or suggestions are welcome. Even if
the approach feels wrong please let me know. :)
Thank you for your time and consideration.

With regards,
Soumyadeep Mukhopadhyay.

Reply via email to