Comments (4)
>>> from moz_sql_parser import parse
>>> import json
>>> json.dumps(parse("select * from coverage-summary.source.file.covered limit 20"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\moz_sql_parser\__init__.py", line 20, in parse
parse_result = SQLParser.parseString(sql, parseAll=True)
File "C:\Python27\lib\site-packages\pyparsing.py", line 1632, in parseString
raise exc
pyparsing.ParseException: Expected end of text (at char 22), (line:1, col:23)
from moz-sql-parser.
The parser response is technically correct; table names must be quoted if they contain special characters. The concern is the error is not helpful.
from moz-sql-parser.
>>> from moz_sql_parser import parse
>>> import json
>>> json.dumps(parse("select * from coverage-summary.source.file.covered limit 20"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\moz_sql_parser\__init__.py", line 32, in parse
raise ParseException(sql, e.loc, "Expecting one of (" + (", ".join(expecting)) + ")")
pyparsing.ParseException: Expecting one of (as, in, inner join, eq, select, end, union, when, group by, cross join, between, desc, then, else, from, with, order by, case, on, join, or, limit, collate nocase, where, having) (at char 22), (line:1, col:23)
from moz-sql-parser.
I think this is done.
from moz-sql-parser.
Related Issues (20)
- What would be the right approach to customise the supported grammar here? HOT 1
- parse failed in this kind of query.
- Interactive usage with jupyterlab fails
- Customizing the SQL parser definition HOT 2
- Parse a sql, format the tokens back to sql, gives syntax invalid query HOT 4
- Is there any plans to use latest version of pyparsing? HOT 2
- Cannot recognize literals when using with an operator HOT 2
- parsing issue for oracle window function HOT 2
- offset can not parse when using order by HOT 1
- Parsing "Select B = A from dual" (which is valid in SQL Server) like "Select A as B from dual" HOT 3
- square brackets are not accepted: "Select [A] from dual"
- (py)parser enters infinite recursion loop with WHERE clause enclosed with parenthesis HOT 2
- DEVELOPMENT MOVED TO klahnakoski HOT 1
- Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms
- New failing test cases from a Redshift user (part 1) HOT 5
- Select CASE with NULL is formatted to None in the sql HOT 6
- Update queries is not working HOT 1
- Expecting StringEnd, found "xxx" (at char 388, (line:1, col:389) HOT 2
- Broken at import HOT 9
- Parser not working HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moz-sql-parser.