You can translate the question and the replies:

Searching for a column used on derived(selection) views within "where" clause

Is there a way to search for columns used in derived "where" clause, but actually is not selected to derived view? Imagine we have a view ** bv_person ** with following properies: { *FirstName, LastName, IsActive, Property1, Property2,......,Propery365* } This view is cached, because of origin datsource is BIG file.csv not supports join, e.t.c. Derived(selection) view is **iv_person** has following: { FirstName, LastName } and where condition:** *IsActive* = true** Now we want cache only properies we are using to build derived view i.e.: *FirstName, LastName, IsActive* I can easy catch *FirstName* and *LastName* using stored procedure COLUMN_DEPENDENCIES() What about *IsActive* ? Any suggestions?
user
12-04-2023 08:32:48 -0400
code

3 Answers

Hi, Currently there is an unavailable stored procedure that retrieves the WHERE clause information. An alternative that I’d do is parsing the VQL code of the view to retrieve the WHERE condition. According to the question [Displaying VQL for all Data Sources](https://community.denodo.com/answers/question/details?questionId=9060g0000000AaRAAU&title=Displaying+VQL+for+all+Data+Sources+in+Denodo). In order to get the VQL of the view: * You can export the VQL of the view by right clicking on the view > "Export" in the Virtual DataPort Administration tool. For more information refer to[ the section Exporting the Server Metadata](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/exporting_and_importing_the_server_metadata/exporting_the_server_metadata/exporting_the_server_metadata). * Or you can use the export script provided by Denodo. You can find the Export script in <Denodo_Home>/bin/export. For more information refer to [ the Export Script section](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/cluster_architectures_server_backup/using_the_import_export_scripts_for_backup_and_or_replication/export_script#export-script) of the VDP Administration Guide. Another alternative that I recommend to you is to use [ the DESC statement ](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/describing_catalog_elements/describing_catalog_elements)which allows obtaining a description of the elements in the Virtual DataPort server. You could use:` DESC VQL VIEW <view_name>`. Using this statement the VQL of the view will be shown in the output. Hope this helps!
Denodo Team
13-04-2023 06:39:19 -0400
code
Thanks for answer I will try this solution, but it will be require lot of work due to check all existing views. By the way, is this feature implemented in denodo Tree View the same way ot her used one simpler solution ? https://drive.google.com/file/d/1YUYcfu8e5sfnEg913YKnJd1k7pN5V-74/view?usp=share_link Thanks in advance!
user
13-04-2023 07:29:16 -0400
Hi, You can use the stored procedure [VIEW_DEPENDENCIES](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/stored_procedures/predefined_stored_procedures/view_dependencies) which allows you to obtain programmatically the same information that the Administration Tool displays in the [Tree View](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/tree_view/tree_view#tree-view) dialog of the derived views. With your scenario in this method it is unavailable to see specific information of the where clause. You can get more information in [the VIEW_DEPENDENCIES section](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/stored_procedures/predefined_stored_procedures/view_dependencies) of the VDP VQL Guide. Hope this helps!
Denodo Team
17-04-2023 05:31:34 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here