You can translate the question and the replies:

dynamically create derived views based on list of multiple base views

Is there a way to take a list of specifc base views (based on say a certain prefix and create a derived view with a similar name (dv versus bv, etc.) I have a list of like twenty base views and looking for way to generate the derived views automatically. i.e. bv_oracle_scm_direct_c_bo_addr --- creater derived view called dv_oracle_scm_direct_c_bo_addr and do loop through entire list.
user
15-11-2021 08:55:13 -0500

1 Answer

Hi, I would create a CSV file (with headers) containing the list of base views and the new derived view names. Then I would create a Scheduler CSV data source on that CSV and create a new VDP job with the [extraction query](https://community.denodo.com/docs/html/browse/8.0/en/scheduler/administration/creating_and_scheduling_jobs/configuring_new_jobs/vdp_extraction_section) like `CREATE VIEW @derived_view AS SELECT * FROM @base_view;` And pass the CSV data source in the data sources section to fill in the interpolation variables. You can read more about creating derived views from VQL in the [VQL Guide](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/defining_a_derived_view/defining_a_derived_view). Though it's recommended to always create views using the Design Studio or [VDP Admin Tool](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_derived_views). Hope this helps!
Denodo Team
15-11-2021 16:50:51 -0500
You must sign in to add an answer. If you do not have an account, you can register here