You can translate the question and the replies:

VQL Parser for Python

Hi, I would like to parse a VQL in Python in order to retrieve all elements of a VQL in a correct AST. Could you please tell me if such kind of parser already exists or if there is a way to get the VQL grammar somewhere ? I already found some fragments in the documentation but I feel like I will miss few things if I only go through all documentation pages. The finality of this is to make a desc VQL of a view or a datasource and replace few elements programmaticaly. Thanks in advance for you help. Regards, Johan
05-02-2021 13:23:47 -0500

3 Answers

Hi, The **DESC VQL** command is generally used to check the VQL which is generated while creating an element. In a situation where there is a need for creating,modifying,deleting or replacing Virtual DataPort elements(like views), I would use the appropriate VQL syntax. For instance to rename a column of a base view I would use the **alter** command. ``` ALTER TABLE bv_hotels( ALTER COLUMN col_name RENAME hotel_names ); ``` This query can also be passed to Denodo through [Python JDBC/ODBC ]( You can refer to the sections under [Virtual DataPort VQL]( Guide to know more about the VQL commands and refer to the [Output Schema of the DESC Commands]( section of the Virtual DataPort Developer Guide for more information on the DESC command. Further , You can also refer to this similar[ Q&A]( for more details. Hope this helps!
Denodo Team
08-02-2021 05:19:13 -0500
Is it possible to provide the VQL grammar or something similar ? A file that would describe how writes a correct VQL. Here is an example for python : Or for java:
11-02-2021 17:22:51 -0500
Hi, Currently, in order to display the grammar or syntax for a VQL query, I would make use of the **HELP** command in the Virtual DataPort Administration Tool. For example to get the syntax of **select** query, I would use the following statement in the VQL Shell of the Virtual DataPort Administration Tool: `HELP SELECT` Alternatively, if the need is to break down the query that is to be executed, I would make use of the **DESC** command. You can also find all the syntax used by VQL grammar under the [Virtual DataPort VQL Guide ]( Hope this helps!
Denodo Team
19-02-2021 07:17:32 -0500
You must sign in to add an answer. If you do not have an account, you can register here