You can translate the question and the replies:

base view metadata

Hi Team, Is there any procedure, function to get : datasource uri, CATALOGNAME, RELATIONNAME for base views. I am looking for a scripted solution which could list down these details for base views in tabular format Thanks
user
27-03-2022 01:47:13 -0400
code

4 Answers

please tell.
user
28-03-2022 01:58:24 -0400
Hi, I would get the DATABASE URI, RELATIONNAME and CATALOGNAME of a base view from its VQL definition. In order to do so, I would follow the below steps, 1. Create a **[JDBC datasource](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#importing-jdbc-sources)** with the Denodo Virtual DataPort adapter 8.0. 2. With this data source, create a base view using "**Create from query**" option using **desc vql view @viewname** as the query, interpolating the view name. 3. Next, in the created base view, navigate to ‘Options 🡪 Search Methods 🡪 Wrapper source configuration’ and set the ‘**Delegate SQL sentence as subquery**’ as 'No'. This would ensure the query is not passed as sub query to the data source and also allows to pass the value for “@viewname” at runtime. 4. By executing the base view after passing required view name, I would get the description(DATABASE URI, RELATIONNAME and CATALOGNAME) of that view in a column as output. Currently, Denodo is providing all these information in the [**wrapper**](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/generating_wrappers_and_data_sources/creating_wrappers/jdbc_wrappers#jdbc-wrappers) generated during the base view creation. For more information, you could read [**Describing Catalog Elements**](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/describing_catalog_elements/describing_catalog_elements#describing-catalog-elements) section of Virtual DataPort VQL Guide. Hope this helps!
Denodo Team
28-03-2022 07:23:55 -0400
code
Hi Team, I know this desc commnad, but it lists view vql in one column. Any possibility to get result in multiple column ? or, solution is to extract details using substr, instr functions ? Thanks.
user
28-03-2022 08:29:09 -0400
Hi, The output of the base view created using DESC command, is the VQL definition of the view. Since the length of the VQL differs for each view considering the values such as data source URI, schema name will be specific to each underlying source, the length of the output column will also vary. Hence applying SUBSTR, INSTR or any text functions to the output column would be complex. If you still need help and if you are valid support user, create a Support case in [Denodo Support Site](https://support.denodo.com/) so that our Support Team will assist you. Hope this helps!
Denodo Team
29-03-2022 02:31:55 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here