Used By Views, through query

Hi Team, Denodo 5.5 Denodo 6 Base Views - BV1, BV2 Derived Views: DV1 = BV1 JOIN BV2 DV2 = BV1 UNION BV2 DV3 = Selection on DV2 So, DV1 is not used further. DV2 is used in DV3. DV3 is not used further. Question: How to get list of views which are not used further. Any stored proc or any combination of stored proc queries which can answer this. Result required is DV1 and DV3 Thanks.
user
11-01-2019 06:37:03 -0500

1 Answer

Hi, To get the list of views that are not used by other views, I have performed the following steps: * Create two base views using **“Create from query”** option using the predefined stored procedures [VIEW_DEPENDENCIES](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/stored_procedures/predefined_stored_procedures/view_dependencies#view-dependencies) and [GET_VIEWS](https://community.denodo.com/docs/html/browse/6.0/vdp/vql/stored_procedures/predefined_stored_procedures/get_views) in Denodo Platform 6.0. * Then, perform [minus](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/creating_views/creating_derived_views/creating_minus_views#creating-minus-views) operation over the views such that the dependent views obtained from VIEW_DEPENDENCIES are removed from the list of available views retrieved from GET_VIEWS. * On executing this, I was able to get the list of views that are not used by other views. These predefined stored procedures are available starting from Denodo Platform 6.0. If you are using previous versions such as Denodo Platform 5.5, you could develop a **Custom Stored Procedure** to implement the required scenario. You can have a look at the Developing Stored Procedures section of [Virtual DataPort Developer Guide](https://community.denodo.com/docs/view/document/Virtual%20DataPort/Denodo%205.5/Virtual%20DataPort%20Developer%20Guide) for more information about the creation of Stored Procedure. Hope this helps!
Denodo Team
14-01-2019 07:35:31 -0500
You must sign in to add an answer. If you do not have an account, you can register here