You can translate the question and the replies:


Hi, I would like to run the COLUMN_DEPENDENCIES procedure across all views in a given database to identify columns that have an expression associated to the column. In pseudo code this would look like: ``` select view_name, column_name, expression from COLUMN_DEPENDENCIES () where input_view_database_name = 'db1' and input_view_name in (select view_name from CATALOG_VDP_METADATA_VIEWS('db1') where view_name like 'co%') and expression is not null; ``` Is it possible to write code that executes this logic? Thanks for your assistance.
10-11-2021 10:18:20 -0500

1 Answer

Hi, The stored procedure [COLUMN_DEPENDENCIES]( requires one input parameter as the view name. To get all the columns with a field expression, I would use the Scheduler to create a VDP job and set the parameterized query in the [extraction section]( to SELECT viewname, columnname, expression FROM COLUMN_DEPENDENCIES () WHERE inputviewdatabasename = 'database' AND inputviewname = '@viewslist' AND expression IS NOT NULL; and I set the non-parameterized query from a VDP data source to SELECT DISTINCT viewname AS viewslist FROM CATALOG_VDP_METADATA_VIEWS () WHERE inputdatabasename = 'database'; and exported the results to a csv or any of the available options in the [export section]( of the job. Hope this helps!
Denodo Team
10-11-2021 16:26:55 -0500
You must sign in to add an answer. If you do not have an account, you can register here