Finding a list of views within a folder from metadata

How do I query Denodo metadata to return all of the views within a specific folder (or it's subfolders) within a database? I can select list of folders using "select resultname from catalog_elements() where resulttype='folder' " but I can't work out how to find the views that sit in each folder nor any relationship between folders.
user
11-06-2019 08:00:22 -0400

1 Answer

Hello, By using the Predefined Stored Procedure GET_VIEWS(), I could retrieve information about the Views such as view name, view type, folder, etc. In order to retrieve the View names which are present in a particular folder, I would filter the results of the GET_VIEWS() Stored Procedure using a WHERE condition. For example, I would execute the following in the VQL Shell of the Virtual DataPort Administration Tool: `select name from get_views() where folder='/03 - derived_views'` This would return all the View Names present in the folder ‘03 - derived_views’ Similarly, to retrieve all the elements like data sources, views, Web services, etc present in a particular folder, I would use the Predefined Stored Procedure GET_ELEMENTS(). For more information, you can take a look at the [GET_VIEWS()](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/stored_procedures/predefined_stored_procedures/get_views#get-views) and [GET_ELEMENTS](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/stored_procedures/predefined_stored_procedures/get_elements#get-elements) sections under the Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
12-06-2019 03:19:07 -0400
You must sign in to add an answer. If you do not have an account, you can register here