You can translate the question and the replies:

How to get direct view dependencies ?

Hi We are currently using the denodo stored procedure viewdependencies() to obtain the dependencies of a view. However, our requirement is to obtain the list of views from database A, having direct dependencies in database B. By "Direct" dependencies, I mean views that are not private, and only the "first level" of dependencies. For example, let's say I have 3 base views *db1.bv1*, *db2.bv2* and *db2.bv3*. Each of them have a derived view in db3 : db3.dv1, db3.dv2, db3.dv3. And in another database db4, I join them together : db4.finalview. I want to obtain only the list of direct dependencies from all the views in db4, where I would find db3.dv1, db3.dv2 and db3.dv3 (but nothing from db1 and db2). Any idea how to achieve that?
04-04-2022 09:44:55 -0400

1 Answer

Hi, In order to get the dependency details, I could use the pre-defined Stored Procedure **VIEW_DEPENDENCIES** which returns the lineage of any view. I would use the below query to get only the immediate dependency of a view, `select * from view_dependencies() where input_view_name='<view_name>'and input_view_database_name='<database_name>' and depth=1 and substr(dependency_name FROM 1 FOR 1) <> '_' and view_name='<view_name>'` The output of this query returns the details of the first level dependency of the specified view. The column **dependency_name** gives the name and **dependency_database_name** gives the database of the dependent view. You could refer to the **[VIEW_DEPENDENCIES](** section of the Virtual DataPort VQL Guide for more information. If you still need help and if you are a valid support user, create a Support case in **[Denodo Support Site](** so that our Support Team will assist you. Hope this helps!
Denodo Team
05-04-2022 07:26:27 -0400
You must sign in to add an answer. If you do not have an account, you can register here