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 *.
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.
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.