Help needed to support Big query SQL syntax via Sqlite Parser

98 views
Skip to first unread message

ta...@superquery.io

unread,
May 13, 2018, 11:27:56 AM5/13/18
to PEG.js: Parser Generator for JavaScript
Hello All,

I'm using SqLite Parser, https://github.com/codeschool/sqlite-parser/edit/master/src/grammar.pegjs, to parse my SQL to JSON.

We are now using Google BQ and some SQL commands are failing in this parser, for example:

select EXTRACT(MONTH FROM DATE_SUB(CURRENT_DATE(), INTERVAL 1 MONTH))

This can be easily reproduced by using PEG online,https://pegjs.org/online, which generate this error on the above SQL

Line 1, column 15: Expected Semicolon or end of input but "(" found.

Thanks in advance,
Tamir

michae...@holidayextras.com

unread,
Nov 16, 2018, 7:41:39 AM11/16/18
to PEG.js: Parser Generator for JavaScript
Hi Tamir, any progress on this one, we'd love to be parsing our GBQ queries as well!?

tamir....@gmail.com

unread,
Nov 18, 2018, 6:39:22 AM11/18/18
to PEG.js: Parser Generator for JavaScript

Hi,

We made a lot of progress but it's now a custom solution. Will be happy to help where I can. You can contact me ta...@evaluex.io

Best,
Tamir

Reply all
Reply to author
Forward
0 new messages