![]() Whoosh a full text search engine also uses it but I have not looked at the source to see how. The first link in the reddit post of Mark Rushakoff gives a SQL example using it. I tried booleneo (a boolean expression parser) written with pyparsing but ended up using pyparsing from scratch. You could try looking at the gadfly (a Python SQL database) as well, but I avoided it as they used their own parsing tool.įor my case, I only essentially needed a where clause. The sql standard grammars are here, but it would be a full time job to convert them yourself and it is likely that you would only need a subset of them i.e no joins. The examples in antlr need a lot of work to convert to a nice ast in python. Python-sqlparse is a non validating parser which is not really what you need. I have looked into this issue quite extensively. To do this, I probably will need to implement an ODBC driver. Combined with Python code that implement the relational operations against my data store, this was fairly simple.Īs I said in one of the comments, the point of the exercise was to make the data available to reporting engines. I implemented a simple SQL parser using pyparsing. Pointers to articles, books or source code that will help me is appreciated.Are there other tools/libraries I should look into? Like PLY or Pyparsing.Does the approach described above sound about right?. ![]() I have never implemented a parser before, and I would therefore like some advice on how to best implement a SQL parser and evaluator. Then return data by evaluating/walking the tree. I am looking into using ANTLR to produce an AST that represents the SQL as a relational algebra expression. Non-relational data store, but it makes sense to access the data in a relational manner. I want to create a SQL interface on top of a non-relational data store. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |