Need assistance in using JSqlParser for analysing Vertica queries #1119
Unanswered
anmolkapoor
asked this question in
Q&A
Replies: 1 comment
-
Since JSqlparser is not limited to one DBMS I see no problems so far adding your syntactical needs. Do you want to provide a PR? If not is it urgent? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Folks,
We use JSQLParser for analysis of MySQL queries, primarily to find columns and tables used in the query. Is it possible to use it for Vertica queries as well? I able to analyse some Select, Update and Insert queries such as :
select (sum(memory_inuse_kb)/1024/1024)::int memory_used_g from resource_pool_status where node_name = 'node1'
But DDL Queries like
create local temporary table _partitions on commit preserve rows as select * from partitions where table_schema='history'
Error
net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "on" "ON"
or
CREATE PROJECTION IF NOT EXISTS history.errors_proj ( date, function_name, log_detail, cursor_position ) AS SELECT errors.date, errors.function_name, errors.message, errors.log_detail, errors.log_hint, FROM history.errors ORDER BY errors.transaction_id, errors.statement_id
Error:
Caused by: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "CREATE" "CREATE" at line 1, column 1.
Any way I can analyse Vertica queries with JSQLParser? Are there plans to extend the support to Vertica?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions