Skip to content

explore using the sqlglot library #2

@ananis25

Description

@ananis25

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions