You can translate the question and the replies:

Fetching View's underlying query

Hi Denodo team, I have a requirement of fetching view and also the query through which this view is created if that view is created by query.I have tried GET_VIEWS(), CATALOG_VDP_METADATA_VIEWS() and CATALOG_METADATA_VIEWS() procedures.But none of them gives me the query code of the view. And in the similar way can I fetch the user defined procedures along with their source codes ? If yes how can I achieve that ? And third thing is, how can I fetch query logs from a particular database and datasource through query? Please help me with the above requirement.Your support is appreciated.Thanks in Advance. Thanks, Kranthi kiran.
15-10-2020 10:10:21 -0400

1 Answer

Hi, In order to get the VQL of a view, I would make use of the [**DESC VQL VIEW <view name>**]( Command. Then, to obtain only user defined procedures, you can use the [**GET_ELEMENTS()**]( Stored Procedure with condition like : > select name from GET_ELEMENTS() where type = 'storedProcedure' and subtype = 'user defined'; Lastly, if I want to fetch the queries of a particular database, I would create a Custom Data source with the [**Denodo Log Custom Wrapper**]( or by creating a Delimited Datasource which points to the **vdp-queries.log** file under the "<DENODO_HOME>\logs\vdp" directory. After creating the views from this data source, I would put the necessary WHERE conditions for retrieving the queries from specific databases. Hope this helps!
Denodo Team
16-10-2020 08:53:59 -0400
You must sign in to add an answer. If you do not have an account, you can register here