Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explore using the sqlglot library #2

Open
ananis25 opened this issue Jul 6, 2022 · 0 comments
Open

explore using the sqlglot library #2

ananis25 opened this issue Jul 6, 2022 · 0 comments

Comments

@ananis25
Copy link
Owner

ananis25 commented Jul 6, 2022

Found it on the internets, sqlglot looks like a fantastic library - parser + query transformer + dialect converter.

Supports building queries incrementally too - link, though not sure how it will work for larger queries. If it does, definitely makes FunSQL in python redundant since writing small sql expressions is more convenient.

We could definitely leverage it meanwhile.

  • Add an SQLNode called LiteralQuery that takes a SQL string, parse it with sqlglot. If we can infer the output columns, could compose/extend it with regular FunSQL constructs.
  • Use it to transpile FunSQL output SQL string to different dialects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant