Teiid Designer 7.0 Development Runtime Modeling and Preview Data Use-Case 1 This use-case involves the first-time user, newly installed JBDS/Designer. This is a bottom-up approach - Define Source Models via Import - Contruct View model from source models - Connect to Teiid - Define Connectors - 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 Model Project 2) Import JDBC Source Model 1 - creates SourceModel_1.xmi (Oracle 11 source) 3) Import JDBC Source Model 2 - creates SourceModel_2.xmi (SQL Server 2000 source) 4) Create View_Model_1 with One Virtual table (View_Table_A) transforming SourceModel_1.Table_1 & SourceModel_2.Table_2 *************************************************************************************************************************************** *** NOTE: At this point - all three models are NOT decorated in the Model Explorer with a "runnable" indicator (i.e. not connected/bound to Teiid) *************************************************************************************************************************************** 5) Create Teiid Server_1 - Server_1_Preview.vdb is created - AdminApi.deployVdb(null, Server_1_Preview.vdb) 6) Right-click SourceModel_1.xmi and "Bind Source to Teiid" a) Launches New Connector Wizard - Wizard is initialized with Teiid Server_1 since it's the only Teiid available - NOTE: If multiple Teiid servers available, user needs to Select Teiid Server_1 b) Select JDBC Oracle 11 Connector Type (might be auto-selected based on model's jdbc info) c) JDBC data from SourceModel_1 populates connector properties - Enter/change any other required properties d) Oracle 11 Connector is created - AdminApi.addConnector(Oracle11Connector, type, properties) e) 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 f) SourceModel_1.vdb is added to Server_1 - AdminApi.deployVdb(Server_1_Preview.vdb, SourceModel_1.vdb) g) Dependency is determined between Virtual and 2 physical models - SourceModel_2.xmi is added to Server_1_Preview.vdb via SourceModel_2.vdb (no connector bindings) - AdminApi.deployVdb(Server_1_Preview.vdb, SourceModel_2.vdb) - 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 Models are deployed as part of the Server_1_Preview.vdb. - SourceModel_1.xmi is decorated with a "runnable" indicator (i.e. connected/bound to Teiid) - only 1 model (SourceModel_1.xmi) is bound to connector and is queryable ************************************************************************************************************ 6) User right-clicks SourceModel_1.Table_1 and selects "Preview Data" - Query results are returned and displayed 7) Right-click SourceModel_2.xmi and "Bind Source to Teiid" a) Launches New Connector Wizard - Wizard is initialized with Teiid Server_1 since it's the only Teiid available - NOTE: If multiple Teiid servers available, user needs to Select Teiid Server_1 b) Select JDBC SQL Server 2000 Connector Type (might be auto-selected based on model's jdbc info) c) JDBC data from SourceModel_2 populates connector properties - Enter/change any other required properties d) SQL Server 2000 Connector is created and bound to SourceModel_2.xmi - AdminApi.addConnector(SQLServer2000Connector, type, properties) - AdminApi.assignConnectorToModel(Server_1_Preview, 1, SourceModel_2, SQLServer2000Connector) ****************************************************************************** *** NOTE: At this point - Both sources are bound to connectors - All three models are decorated with a "runnable" indicator - All three models are queryable ****************************************************************************** 8) User right-clicks SourceModel_2.Table_1 and selects "Preview Data" - Query results are returned and displayed 9) User right-clicks View_Model_1.View_Table_A and selects "Preview Data" - Query results are returned and displayed 10) 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 11) Execute the VDB - Right-click MyViews.vdb in Model Explorer and select "Run As > Teiid Source"