-
1. Re: Dynamic VDB view model and source model column names mismatch
rhn-engineering-vhalbert Oct 23, 2017 8:57 AM (in response to adi22)Aditi,
Its never good practice to use "SELECT *" in a view because the view breaks if you ever need to add a column to the source table. The benefits of having view layers and the ability to incrementally update views when source tables change is negated when using SELECT *.
Van
-
2. Re: Dynamic VDB view model and source model column names mismatch
adi22 Oct 24, 2017 3:31 AM (in response to rhn-engineering-vhalbert)Hi,
Yes, you are correct but we have around more than 1000 tables with huge columns. So writing complete column names and datatypes in the select query for source and view models will increase the size of vdb.xml and it will be tedious as well. Hence, we were searching for method or function that can fetch the column names with datatypes for both source and view models from the datasource itself.
-
3. Re: Dynamic VDB view model and source model column names mismatch
rareddy Oct 24, 2017 11:37 AM (in response to adi22)You mean View model on the source? A view on a source model in Teiid is treated as just another source table. If the View is on the Teiid side, then you have to create it. If it is mostly union like above, maybe you can write simple script or custom program to read the database and output the VDB the way you need.
Ramesh..