I am using teiid embedded which do not provide congiguration stuff. I created my own UI to create configurations where i can specify source information . Model information where user can
specify what all JDBC -tables should be available (i.e. selected list of tables) , and can also rename the column names. On these models user can define the VDB's i.e. the same use model how the teiid designer works.
Now reading these configurations i would like to create models , and VDB's and i am using following api's. Sample code:
string strVDBName = "myVDB";
jdbcModel = new ModelMetaData();
jdbcModel.addSourceMapping("XXX", "sqlserver", "XXX");
jdbcModel1 = new ModelMetaData()
jdbcModel1.addSourceMapping("YYY", "sqlserver", "YYY");
List<ModelMetaData> modelsList= new ArrayList<ModelMetaData>();
When i am using these api's the complete list of tables (not the selected one ) are available in VDB on which user can query on. Also the columns actual name are getting displayed where as i want the renamed columns.
Are there any api's in embedded mode , where i can mention the schema of models i.e. what all tables should be available(say i want only handful of tables available) and also the mapping
of the columns (i.e. renamed column and actual columns) . So that a VDB user can query only on those handful tables and also on the renemed columns.
if source table have 100 tables i want only 10 tables to be available to the VDB user , and say if table1 has schema say EmployeName and EMPID , where as i renamed EmployeName to EmpName , so i want i can write query "select EmpName from table1 "; and internaly it maps to the actual column name and fetches the data for me.