You can translate the question and the replies:

Extra VQL query from the view

I have developed morethan 1000 derived views I am capturing all the Metadata with dependent views stored into one view or table I want to be extract VQL Query like select e.empid,e.empname,D.deptid from emp join dept on Emp.deptid= dept.deptid I want extra query like this . can you help with this
#VQ
user
04-04-2023 22:13:52 -0400
code

1 Answer

Hi, As per my understanding, you want to extract the VQL SELECT query of the views you created with dependencies to multiple tables like UNIONs and JOINs. Denodo Platform has a lot of predefined stored procedures, functions and syntax statements that can be used to get data and information of your database catalog elements. To be able to extract the SELECT query of your views with multiple dependent views, you can follow these steps: 1. Get the list of all views with multiple dependent views using the predefined stored procedure [VIEW_DEPENDENCIES()](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/stored_procedures/predefined_stored_procedures/view_dependencies). You can use it in a SELECT query to get all the views of a database and filter your results like below: ``` SELECT * FROM VIEW_DEPENDENCIES() WHERE input_view_database_name = 'database_abc' AND position('Datasource' IN dependency_type) = 0 AND view_type <> 'Select' ``` 2. Get the VQL definition of your views using the [DESC](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/describing_catalog_elements/describing_catalog_elements) statement, which allows you to obtain the description of your Denodo catalog elements. For example, the query below will return the VQL SELECT script to create the JOIN view dv_order: ``` DESC VQL VIEW dv_order ('includedependencies'='no','dropelements'='no') ``` Hope this helps!
Denodo Team
11-04-2023 03:39:34 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here