Parsing is failing when fetching from table named `All`
See original GitHub issueWhen trying to parse the query from table name all
parsing fails.
Full traceback:
Input In [24], in <cell line: 1>()
----> 1 mo_sql_parsing.parse('select count(*) from all')
File /usr/local/lib/python3.8/site-packages/mo_sql_parsing/__init__.py:37, in parse(sql, null, calls)
35 if not common_parser:
36 common_parser = sql_parser.common_parser()
---> 37 result = _parse(common_parser, sql, null, calls)
38 return result
File /usr/local/lib/python3.8/site-packages/mo_sql_parsing/__init__.py:78, in _parse(parser, sql, null, calls)
76 utils.scrub_op = calls
77 sql = sql.rstrip().rstrip(";")
---> 78 parse_result = parser.parse_string(sql, parse_all=True)
79 output = scrub(parse_result)
80 for o, n in utils.null_locations:
File /usr/local/lib/python3.8/site-packages/mo_parsing/core.py:79, in entrypoint.<locals>.output(*args, **kwargs)
76 except Exception as e:
77 Log.error("reset action failed", cause=e)
---> 79 return func(*args, **kwargs)
File /usr/local/lib/python3.8/site-packages/mo_parsing/core.py:141, in Parser.parse(self, string, parse_all)
116 @entrypoint
117 def parse(self, string, parse_all=False):
118 """
119 Parse a string with respect to the parser definition. This function is intended as the primary interface to the
120 client code.
(...)
139
140 """
--> 141 return self._parseString(string, parse_all=parse_all)
File /usr/local/lib/python3.8/site-packages/mo_parsing/core.py:163, in Parser._parseString(self, string, parse_all)
161 return tokens.tokens[0]
162 except ParseException as cause:
--> 163 raise cause.best_cause from None
ParseException: Expecting (, found end of text (at char 24), (line:1, col:25)```
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Error with SQL query: The query failed to parse. Exception ...
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not ...
Read more >failed to parse SQL query: ORA-01403 No Data Found
Hi, i ´ve a query that gives me that error when i´m working with a special user. 3 others users don´t get this...
Read more >Error when trying to use output of Parse JSON
I used the payload to create the schema and the parse runs fine, rendering all the data into the proper variable names.
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
What went wrong? JSON. parse() parses a string as JSON. This string has to be valid JSON and will throw this error if...
Read more >JR62512: HIVE CONNECTOR FAILS TO PARSE SELECT ...
sql.SQLSyntaxErrorException: [IBM][Hive JDBC Driver] [Hive]Error while compiling statement: FAILED: ParseException line 1:15 cannot recognize input near '< ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you very much for pointing this out.
https://github.com/klahnakoski/mo-sql-parsing/commit/0c0e817009ee960ee9ada84a251ca6072d6d7123