Teiid Designer 7.0 Development Runtime Modeling and Preview Data Use-Case 2 This use-case involves the first-time user, newly installed JBDS/Designer. This is a Server-down approach - Define Teiid Server - Define Models via Import and define connectors - Contruct View model from source models - Preview Data - Create VDB - Execute VDB ****************************************************************************** Set-up - Designer Installed - Oracle 11 & SQL Server 2000 data source info available - Teiid Server installed somewhere with URL/connection info available ****************************************************************************** 1) Create Teiid Server_1 - Server_1_Preview.vdb is created - AdminApi.deployVdb(null, Server_1_Preview.vdb) 2) Create Model Project 3) Import JDBC Source Model 1 - creates SourceModel_1.xmi (Oracle 11 source) - Oracle 11 Connector is auto-created - AdminApi.addConnector(Oracle11Connector, type, properties) - SourceModel_1.vdb creation for SourceModel_1.xmi - Source Binding is created and added to vdb.xml - vdb.xml & SourceModel_1.xmi's Index files are zipped into SourceModel_1.vdb - SourceModel_1.vdb is added to Server_1 - AdminApi.deployVdb(Server_1_Preview.vdb, SourceModel_1.vdb) ************************************************************************************************************ *** NOTE: At this point - SourceModel_1 is now deployed into Server_1_Preview.vdb. - SourceModel_1.xmi is decorated with a "runnable" indicator (i.e. connected/bound to Teiid) - SourceModel_1.xmi is queryable ************************************************************************************************************ 4) User right-clicks SourceModel_1.Table_1 and selects "Preview Data" - Query results are returned and displayed 5) Import JDBC Source Model 2 - creates SourceModel_2.xmi (SQL Server 2000 source) - SQL Server 2000 Connector is auto-created - AdminApi.addConnector(SQLServer2000Connector, type, properties) - SourceModel_2.vdb creation for SourceModel_2.xmi - Source Binding is created and added to vdb.xml - vdb.xml & SourceModel_2.xmi's Index files are zipped into SourceModel_2.vdb - SourceModel_2.vdb is added to Server_1 - AdminApi.deployVdb(Server_1_Preview.vdb, SourceModel_2.vdb) ************************************************************************************************************ *** NOTE: At this point - SourceModel_21 is now deployed into Server_1_Preview.vdb. - SourceModel_2.xmi is decorated with a "runnable" indicator (i.e. connected/bound to Teiid) - SourceModel_2.xmi is queryable ************************************************************************************************************ 6) User right-clicks SourceModel_2.Table_1 and selects "Preview Data" - Query results are returned and displayed 7) Create View_Model_1 with One Virtual table (View_Table_A) transforming SourceModel_1.Table_1 & SourceModel_2.Table_2 - View_Model_1.xmi is added to Server_1 via View_Model_1.vdb (no connector bindings needed) - AdminApi.deployVdb(Server_1_Preview.vdb, View_Model_1.vdb) ****************************************************************************** *** NOTE: At this point: - All 3 models are now deployed into Server_1_Preview.vdb. - Both sources are bound to connectors - All three models are decorated with a "runnable" indicator - All three models are queryable ****************************************************************************** 8) User right-clicks View_Model_1.View_Table_A and selects "Preview Data" - Query results are returned and displayed 9) User selects View_Model_1.xmi in Model Explorer and creates VDB a) Select View_Model_1.xmi in Model Explorer b) Right-click select "New > Virtual Database" - Provide unique name "MyViews" and model project location - Teiid Server_1 is auto-selected - NOTE: If multiple Teiid servers available, user needs to Select Teiid Server_1 c) VDB Editor is opened - Designer detected dependencies and added all 3 to MyViews.vdb - Model table indicates both sources are bound and includes connector names d) MyViews.vdb is displayed in ModelExplorer 10) Execute the VDB - Right-click MyViews.vdb in Model Explorer and select "Run As > Teiid Source"