Home

Red Hat JBoss Developer Studio 4.1 Teiid Designer User Guide

image

Contents

1. gt bibliography RooksNS Ribliooranhy gt E bookListing New Child gt gt E bookCollectic New Sibling gt gt E bookSetMixe New Association gt gt E Bibliography Modeling gt Create Scalar To XML Transformation gt EJ Bilbiographyt Create XML To Scalar Transformation D E BookSetfat tr oe Set org ecli to FK_Account_Accountid Create WNT View Documents eni amp Add to Metadata Favorites gt E BookSetNest of Cut ETE gt E BookNested Figure 5 7 Create XML View Documents Action The action will query you for a target XML Document model You can either select an existing XML Document model from your workspace or enter a unique model name and the wizard will create a new model for you Select or create XML View model amp BooksxXMLiest gt C BookDatatypes xsd gt 3 Books xsd gt ES Booksinput xsd gt f BooksXML xmi pa Parts lest gt ig Northwind xmi b Og PartsSupplier xmi Parts TestVDB vdb b Og ProductsOracle xmi New Model Name ee Enter name and click OK to create a new XML View Model in folder BooksXMLTest Properties Properties Cancel 0K Figure 5 8 Select or Create XML View Model Dialog After selecting or creating your new XML Document model the XML Document builder page will be 105 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Build XML Documents From XML Schema X Select XML Schema Select XML Schem
2. A M fPartsProject PartsSourceA xmi PARTS PART_COLOR PartsProject PartsSourceB xmi PARTS PART COLOR PartsProject PartsVirtual xmi PARTS PART COLOR PartsProject PartsVirtual xmi partsByt olor NewProcedureRe Cancel Figure 8 3 Find Model Object Dialog e Step 2 Begin typing a word or partial word in the Type Object Name field Wild card characters will be honored As you type the objects which match the desired name will be 135 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide displayed in the Matching Model Objects list If there are more than one objects with the same name the locations or paths of the objects are displayed in the Locations list Step 3 If more than one object exists with the desired name select the one of the locations Step 4 Click OK If editor is not open for the object s model an editor will open The desired object should end up displayed in a diagram if applicable and selected 8 2 Search Models Via Relationship Properties The Telid Designer provides a search capability to find model objects that are characterized by one or more relationship property values including relationship type participants and name To search for relationships Step 1 Select Search gt Relationships action on the Teiid Designer main menu EF which opens the Search dialog Search EP File Search 4 Metadata Search Ha Java Search gt Type Any O Name wv Participants F
3. MySQL is a registered trademark of MySQL AB in the United States the European Union and other countries Node js is an official trademark of Joyent Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node js open source or commercial project The OpenStack Word Mark and OpenStack Logo are either registered trademarks service marks or trademarks service marks of the OpenStack Foundation in the United States and other countries and are used with the OpenStack Foundation s permission We are not affiliated with endorsed or sponsored by the OpenStack Foundation or the OpenStack community All other trademarks are the property of their respective owners Abstract The Telid Designer User Guide explains how to use the Telid Designer with the T eiid module Table of Contents Oo oo 2 6 ama Ae oe aan a aS a a a a ee ee eae eee 1 Document Conventions Chapter 1 Introduction 1 1 What is Telid Designer 1 2 Why Use Teiid Designer 1 3 Metadata Overview Chapter 2 New Model Wizards 2 1 Creating New Relational Source Model Chapter 3 Importers 1 1 Typographic Conventions 1 2 Pull quote Conventions 1 3 Notes and Warnings 2 We Need Feedback 1 3 1 What is Metadata 1 3 2 Editing Metadata vs Editing Data 1 3 3 Metadata Models 1 3 4 Business and Technical Metadata 1 3 4 1 Technical Metadata 1 3 4 2 Business Metadata 1 3 5 Design Time and Runtime Metadata 1 3 5 1 D
4. DECLARE integer VARIABLES insert_count 0 INSERT INTO RestfulBooks VirtualBooks RestfulBooks VirtualBooks ISBN RestfulBooks VirtualBooks TITLE RestfulBooks VirtualBooks SUBTITLE RestfulBooks VirtualBooks PUBLISHER RestfulBooks VirtualBooks PUBLISH_YEAR RestfulBooks VirtualBooks EDITION RestfulBooks VirtualBooks TYPE RestfulBooks VirtualBooks AUTHOR_ID VALUES RestfulBooks rputBook isbn_in RestfulBooks rputBook title_in RestfulBooks rputBook subtitle_in RestfulBooks rputBook publisher_in RestfulBooks rputBook publish_year_in RestfulBooks rputBook edition_in RestfulBooks rputBook type_in RestfulBooks rputBook author_id_in VARIABLES insert_count VARIABLES ROWCOUNT IF VARIABLES insert_count 1 BEGIN SELECT XMLCOMMENT Insert was successful AS result END ELSE BEGIN SELECT XMLCOMMENT insert failed AS result END The input format for the REST procedure could be URI parameters an XML JSON document or some combination of both When using an XML document your root node should be lt input gt and the XML nodes should correspond to order of the procedure s input parameters For example here is the input for the above insert procedure lt input gt lt ISBN gt 0 13 014714 1 99999 lt ISBN gt lt TITLE gt The XML Handbook lt TITLE gt lt SUBTITLE gt Updated Edition lt SUBTITLE gt lt PUBLISHER gt 16 lt PUBLISHER gt lt PUBLISH YEAR gt 2000 lt PUBLISH YEAR gt lt EDITION gt 2 lt EDITION gt
5. Next gt Cancel Finish Figure 2 3 Generate Web Service Translator Procedures Dialog 2 1 3 Copy From Existing Model This builder option performs a structural copy of the contents of an existing model to a newly defined model You can choose a full copy or select individual model components for copy To create a new relational model by copying contents from another relational source model complete Step 5 Select the model builder labeled Copy from existing model of the same model class and click Next gt The Copy Existing Model dialog will be displayed Step 6 Select an existing relational model from the workspace using the browse button l An existing model will be pre selected if a relational model in the workspace is selected in Step 7 Check the Copy all descriptions option if desired Click Finish 23 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide New Model Wizard Copy an Existing Model Select an existing model to be copied Existing Model USCustomers xmi Model Contents gt E ACCOUNT gt E ACCOUNTHOLDINGS gt E CUSTOMER gt O Data Source Copy all descriptions Cancel Figure 2 4 Copy An Existing Model Dialog 2 2 Creating New Relational View Model Create New Relational View Model To create a new empty relational view model Step 2 Specify a unique model name Step 3 Select Relational option from Model Class drop down menu St
6. Reset Cancel Anish Figure 2 6 Create Virtual Tables From XML Schema Dialog a Step 4 Select one or more global schema entities and move from left panel to the right panel Click Finish when done When model generation is complete the new model will be opened in an editor for your viewing 2 3 Creating XML Document View Model Create XML Document View Model To create a new empty xml document view model Step 2 Specify a unique model name Step 3 Select XML option from Model Class drop down menu e Step 4 Select View Model from Model Type drop down menu Step 5 Click Finish You can change the target location i e project or folder by selecting the Browse button and selecting a project or folder within your workspace In addition to creating a new empty xml document view model the following builder options are available a Copy from existing model of the same model class Build XML documents from XML schema 26 Chapter 2 New Model Wizards 2 3 1 Copy From Existing Model This builder option performs a structural copy of the contents of an existing model to a newly defined model You can choose a full copy or select individual model components for copy To create a new relational model by copying contents from another xml document view model Step 5 Select the model builder labeled Copy from existing model of the same model class and click Next gt The Copy Existing
7. Step 3 The radio buttons on either side of the Predicate Editor let you choose what type of content to place in that side of your predicate Click the radio button of the type of content you want to place in your criteria You can click a Attribute to add an attribute to the predicate If you click the Attribute radio button the Predicate Editor looks like this Attribute Constant Function Value is unchanged vo E PartsSourceA SUPPLIER PARTS A PartsSourceA SUPPLIER_PARTS SUPPLIER_ID FA PartsSourceA SUPPLIER_PARTS PART ID FA PartsSourceA SUPPLIER_PARTS QUANTITY A PartsSourceA SUPPLIER PARTS SHIPPER_ID lt v PartsSourceB SUPPLIER A PartsSourceB SUPPLIER SUPPLIER _ID A PartsSourceB SUPPLIER SUPPLIER_NAME A PartsSourceB SUPPLIER SUPPLIER_STATUS A PartsSourceB SUPPLIER SUPPLIER_CITY From the tree select the attribute you want to add to the expression You can select an attribute from any of the source classes in the transformation s Constant to add a hard wired constant value to the predicate If you click this radio button 87 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide the Predicate Editor looks like this Attribute Constant C Function Apply to replace selected Attribute with Constant below Type string Value Figure 4 16 Constants Panel Select the datatype for this constant from the Type drop down list and enter the value in the Value ed
8. Materialized um true Materialized Table l PARTS Path PartsTest MaterializedParts xmi MaterializedP arts Name CA PARTS Name In Source A PARTS Supports Update E false HO System a CZ ne BaseTable PartsViewModel PARTS Figure 5 5 Materialized Table Properties 102 Chapter 5 Metadata specific Modeling Designer includes a feature to assist in quickly creating materialized relational tables based on your existing view tables To create materialized views eean ede lina Create Materiali ed Views a i ee ee ee A o ee ek Pk a roe New Child New Sibling gt New Association b p p gt sur gt Gg Product Salesforce lt Undo Delete multiple objects Ld SearchProj Redo ta Add To New Custom Diagram Ld SF_Testing ay Teste of Cut P Add to Metadata Faworites estRels Cut rl mo Copy Ctrl C i T Psete Ctrl y h 5 Step 2 Inthe Create Materialized View Model dialog specify or select a target relational model for your generated relational tables Modeling 1 Create Materialized Views Create Web Service Create Materialized View Model Create Materialized View Model All inputs OK Press Anish to create materialized view tables Target Location MaterializedParts Selected Virtual Tables E PARTS SHIP VIA Cancel Anish Step 2a Selecting the browse button displays the
9. gt readme New gt gt C Perss E 7 ory gt G Partsss ae Execute VDB b GB Partsvi Open Es gt fg Sample Open With gt Figure 7 10 Execute VDB Action 128 Chapter 7 Testing Your Models Step 2 Select your new Teiid connection profile and right click select Open SQL Scrapbook enter your designer SQL i e SELECT FROM T ableXxXxXxX select all text and right click select Execute Selected Text SQL Scrapbook 0 3 Q Parts vdb 0 Connection profile Type Teiid_7 1 gt Name Parts Teiid Connecti gt Database Status Connected Auto Con SELECT FROM PartsSourceA Parts A Figure 7 11 SQL Scrapbook Editor Step 3 Results of query should be displayed in the SQL Results view on the Result1 tab E SQL Results 53 x e ral p yago Type query expression here Status Operation Date Connection Profile Succee SELECT FROM PartsSourceA Parts Oct 15 2010 Parts Teiid Connection peer gt PART_ID PART_NAME PART_COLOR PART_WEIGHT 4 ie ee eee eee 2 P301 Bolt Green 12 3 P302 Screw Blue 13 4 P303 Bolt Green 17 5 P304 Cam Green 18 Ki a S Figure 7 12 SQL Results View 7 3 3 Deploy VDB from Model Explorer You can also deploy your VDB first by selecting it in the Model Explorer and dragging dropping it onto a connected Teiid instance in the T eiid view or right click select Modeling gt Deploy action Once deployed you can s
10. idbc teiid evdbname gt mm localhost 31000 eat Figure 10 14 New Teiid Instance Dialog The dialog contains two three sections The top panel contains host name and an option to customize the new Teiid instance label in the teiid view The second panel Teiid Admin Connection Info pertains to the connection information required to connect to the admin URL of your installed T eiid instance The operations Designer exposes deal with deploying and undeploying VDBs as well as managing your test data sources required by those VDBs to successfully connect and query data through the Teiid runtime engine The third panel Teiid JDBC Connection Info provides for entering the connection information for that same Teiid instance This information is required for Designer to make JDBC connections during execution of the Preview Data feature Enter valid Host Port User name and Password information edit any options and click Finish Actions available in this view include New Teiid Instance Create a new instance of a running Teiid server fl Teiid Server Properties View and edit properties of an existing Teiid instance oo Reconnect Reconnect and refresh contents of the selected Telid instance 157 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide 3 Delete Disconnect and delete the selected Teiid instance 4 Execute VDB Creates a JDBC Teiid connection profile and opens the Data Tools Database Development persp
11. A Teiid server is not available so translator types are not available A translator name and translator type are both required when creating a translator override Press OK when finished Figure 10 57 Add New Translator Override Dialog 10 4 Telid Designer Main Menu There are 8 categories of actions on Teiid Designer s main menu bar These categories include 184 SQL Support Guide and Eclipse Overview information Tetid Designer PartsProject PartsSourceA xmi JBoss Developer Studio Metadata Run Figure 10 58 Application Main Menu Ale Edit Refactor Navigate Search Project 10 4 1 File Menu The File menu provides actions to manage your workspace resources Window Help Tetid Designer PartsProject Parts Edit Refactor Navigate Search Project Me New Shift Alt N gt Open Ale Close ctrew Close All Shitt Ctri w Refresh Convert Line Delimiters To Switch Workspace Restart gg Import gy Export Properties 1 PartsSourceA xmi PartsProject 2 Parts vdb PartsProject 3 PartsSourceB xmi PartsProject Exit Figure 10 59 File Menu F5 Alt Enter l Chapter 10 Teiid Designer Ui Reference The New gt sub menu provides specific actions to create various generic workspace resources as well as Teiid Designer models and VDBs 185 Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide Ble Edit Refactor Navigate Search Project Metadata Run Window
12. Core Relational MSD Validation Control Settings XML Schema Document validation problems Ignore amp Figure 9 12 XSD Schema Model Validation Preferences Panel 146 Chapter 9 User Preferences Increasing the severity level to error will prevent you from testing your VDB or deploying a web service if violations of that preference are found during validation 147 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 10 Teiid Designer Ui Reference 10 1 Telid Designer Perspectives perspective defines the initial set and layout of views and editors Within the application window each perspective shares the same set of editors Each perspective provides a set of functionality aimed at accomplishing a specific set of tasks Perspectives also control what appears in certain menus and toolbars They define visible action sets which you can change to customize a perspective You can save a perspective that you build in this manner making your own custom perspective that you can open again later 10 1 1 Telid Designer Perspective The Telid Designer perspective provides access to fundamental model editing and management capabilities This perspective includes 5 main Ul components or groups of components as shown below They include Miscellaneous Views Includes Problems view Message Log view and the Data Tools SQL Results view opened if Preview Data action is performed 148 Chapter 10 Teiid De
13. Select a datatypes model from your workspace or specify a unique name to create a new model Step 6 Select any additional options and choose Finish 3 6 Import WSDL into Relational Source Model You can create a Relational model by selecting an existing Web Services Connection Profile defined by a WSDL file in your workspace or defined by a URL Designer will interpret the WSDL locate any associated or dependent XML schema files generate a physical model to invoke the service and generate virtual models containg procedures to build and parse the XML declared as the service 56 Chapter 3 Importers messages The sample WSDL for this section defines the following A single wsdl service named Share _BSM_ Real_Time_Data_Design_Server_RealT imeData_portService A single wsdl port named Share _BSM _ Real_Time_Data_Design_Server_RealT imeData_portPort0 A single wsdl portType named Share _BSM_ Real_Time_Data_Design_Server_RealTimeData_portPortT ype A single wsdl operation named OnHand Share_BSM_Real_Time_Data_Design_Server_RealTimeData_portService q Share_BSM_Real_Time_Data_Design_Server_RealTimeData_portPortType 4 OnHand Share_BSM_Real_Time_Data_Design_Server_RealTimeData_portPort0 http dladb07 5555 soap rpe gt input P OnHandInput __webServicelnput P OnHand_DT E __OnHand_DT To create relational models from WSDL use the steps below Step 1 In Model Explorer choose the File gt Import action in the to
14. Select the import option Teiid Designer gt Salesforce gt gt Source Model and click Next gt 48 Chapter 3 Importers Select Create Relational Model from Salesforce Objects Select an import source type filter text 2 Teid Designer 1 DDL into Relational Model Er Flat Ale Source gt gt Source and View Model Metadata from JDBC Database af Metadata from Text Ales on file system Salesforce as Relational Source Model aF WSDL into Relational Source Model pP WSDL into Web Service Model S XML Schemas gt E XML Cancel Figure 3 19 Import from Salesforce e Step 3 Select existing or previous connection profile from the drop down selector or press New button to launch the New Connection Profile dialog See Eclispe Data Tools documentation or Edit to modify change an existing connection profile prior to selection Note that the Connection Profile selection list will be populated with only Salesforce connection profiles Create Relational Model from SalesForce Data Model SalesForce Credentials Validate the SalesForce Connection Profile Connection Profile SSsSSsSsSsSsSSSSses Properties URL lt default gt User Name joeBlow bogus ortg Password seeoigoiogoioiataiakaatiak Figure 3 20 Select Salesforce Credentials Dialog e Step 4 After selecting a Connection Profile input password if not provided Press Next gt to 49 50 Red Hat JBoss Developer Stu
15. bookCollection Problem v amp Warnings 1 item i i i amp The type referenced by column book_edition must be marked as an enterprise datatype Books xmi BooksProject bookCollection t Problem Figure 10 24 Problems View By default the Problems View is included in the Teiid Designer perspective If the Problems View is not showing in the current perspective click Views gt Show View gt Other gt Teiid Designer gt Problems There are 5 columns in the view s table which include 1 Description A description of the problem preceded by a severity icon i e error warning amp orinfo Resource The name of the resource Path The project name Location The object within the resource that has a validation error oF W N type Type of validation item 10 2 7 1 Toolbar Menu Click the upside down triangle icon to open the View Menu icon to see various options including sorting filtering displayed columns and much more 10 2 7 2 Context Menu Additional actions are available by selecting a problem and right click to open a context menu i E gti a 7 Ills 24 l error 1 warning 0 others Description Errors 1 item GE SOL statement is g 7 amp Warnings 1 item The type reference Pane Ctre P i Delete Delete Select All Ctri A Show In Shift Alt w gt Properties Alt Enter 163 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Figur
16. gt t BooksProject hod Ee PartsProje ct gt data gt readme Q Parts vdb gt PartsSourceA xmi gt PartsSourceB xmi v B PartsVirtual xmi gt import declarations 4 Ha Package Diagram gt E Supplierinfo gt E partsByColor gt Og SampleViews xmi Figure 10 7 Model Explorer View The toolbar consists of nine common actions WY Preview Data Executes a simple preview query SELECT FROM Sort Model Contents Sorts the contents of the models based on object type and alphabetizing amp Refresh Markers Refreshes error and warning markers for objects in tree Back Displays the last Go Into location See Eclipse Help Forward Displays the next Go Into location See Eclipse Help Lag Up Navigates up one folder container location See Eclipse Help Collapse All Collapses all projects Link with Editor When object is selected in an open editor this option auto selects and reveals object in Model Explorer Additional Actions The additional actions are shown in the following figure 152 Chapter 10 Teiid Designer Ui Reference gt kra 2 Show all file types Show Imports Select Working Set Deselect Working Set Sort gt l Filters _ Link with Editor Figure 10 8 Additional Actions lf Show Model Imports is checked the imports will be displayed directly under a model resource as shown below v IA PartsVirtual
17. ia Model Explorer System Catalog p4 Bs v SYS gt A VirtualDatabases gt B Schemas gt E Tables gt El Datatypes gt A Columns gt Bl Keys gt KeyColumns gt H Procedures ProcedureParams Properties E getCharactervDBResource A getBinaryvDBResource getVDBResourcePaths gt Ee ReferencekeyColumns v H getXMLSchemas H document string gt El schemas wr WF NO O N WY Figure 10 30 System Catalog View 10 2 12 SQL Reserved Words View To open Teiid Designer s SQL Reserved Words view select the main menu s Views gt Show View gt Other and select the Teiid Designer gt SQL Reserved Words view in the dialog Word Bk Problems g Alter Text any character any String Se Matching Reserved Words SECOND SELECT SENSITIVE SESSION USER SET Figure 10 31 System Catalog View You can also display the view by selecting the the main menu s Metadata gt Show SQL Reserved Words action as shown below 167 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Teiid Designer roject ou e Run Window Help Fi ate Show System Catalog Te Show Datatype Hierarchy Show SQL Reserved Words alr Figure 10 32 System Me K View 10 3 Editors Editors are the Ul components designed to assist editing your models and to maintain the state fora given model or resource in your workspace When editing a model the model will be opened
18. rename the new object right in the tree Delete Deletes the selected object s Select All Select All objects in current view Rename Allows a user to rename an object in the tree Find Replace Launches dialog that can be used to search in the current text view such as a Transformation Editor Open Opens the selected object in the appropriate editor Edit Opens the selected object in the appropriate specialized editor such as the Choice Editor or Recursion Editor Add Bookmark This command adds a bookmark in the active file on the line where the cursor is currently displayed Add Task This command adds a task in the active file on the line where the cursor is currently displayed 10 4 3 Refactor Menu The Refactor menu provides Telid Designer specific actions for file level changes to the models Figure 10 62 Refactor Menu The Refactor menu contains the following actions Undo Undo the last refactor command Redo Redo the last undone refactor command Move Move a model from one container folder or project to another Rename Rename a model 10 4 4 Navigate Menu Telid Designer currently does not contribute actions to the Navigate menu See Eclipse documention for details Chapter 10 Teiid Designer Ui Reference Pe a hd Go To gt Open Spring Bean Shift Alt B S Open Seam Component Shift Ctrl z2 Show In Shit Alt w gt Figure 10 63 Navigate Menu 10 4 5 Sear
19. 2002 SD dee http www metamatrix com metamodels Compare dee http www metamatrix com metamodels Core dee http www metamatrix com metamodels Dependency dee http www metamatrix com metamodels Diagram dee http www metamatrix com metamodels Extension dee http www metamatrix com metamodels DBC dee http www metamatrix com metamodels MetaMatrixFunction dee http www metamatrix com metamodels Relational gt H AccessPattern gt RelationalEntity com metamatrix metamodels r FFF FFF F EEE H BaseTable gt Table com metamatrix metamodels relational Base H Catalog gt RelationalEntity com metamatrix metamodels relatior H Column gt RelationalEntity com metamatrix metamodels relatior H ColumnSet gt RelationalEntity com metamatrix metamodels rela DirectionKind Foreignkey gt Relationship com metamatrix metamodels relatior Index gt RelationalEntity com metamatrix metamodels relational LogicalRelationship gt Relationship com metamatrix metamodel LogicalRelationshipEnd gt RelationalEntity com metamatrix meta MultiplicityKind NullableType WON NO SF NO SF NO NO NO SF F n O OO OO OO g Figure 10 29 Datatype Hierarchy View 10 2 11 System Catalog View To open Teiid Designer s System Catalog view select the main menu s Views gt Show View gt Other and select the Teiid Designer gt System Catalog view in the dialog 166 Chapter 10 Teiid Designer Ui Reference
20. 6 2 Move Model TO move a model in your workspace Ww ea AllCustoamerAccounts Sources t air Northwind xmi New gt gt t BooksProject a Child gt gt PartsProject Modeling gt gt t wSDLImportProject Open Open With gt Copy TE Paste Ctri V Paste Special Ctrl V Delete Refactor Undo Redo g g Import pq Export Rename Namespace URI Figure 6 3 Refactor Move Action In Model Explorer a Step 3 Select a new location i e Project or Folder and click OK Move Northwind xmi the move destination wv we AllCustomerAccounts gt Ca Northwind xmi Ee Sources gt E5 BooksProject b gt PartsProject gt WSDLImportProject Cancel Figure 6 4 Move Model Dialog 6 3 Save Copy of Model The Save As action performs a similar function as the Refactor gt Rename action except the renamed model is a structural copy of the original model 117 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Each model object maintains it s own unique ID So copying a model will result in a exact structural copy of your original model but with re generated unique object IDs Be aware that locating and copying your models via your local file system may result in runtime errors within Designer Each model is expected to be unique and duplicate models are not permitted To create a duplicate model using Save As Step 1 Open the model you wish to copy in a Mod
21. Books xsd Select one or more Schema Root Elements to generate Virtual Documents Schema Root Elements Virtual Documents e bookListing BooksNS BookSetFlat e bookSetMixed BooksNS BookSetMixed 5 Reset e bookCollection BooksNS BookSetNested e bibliography BooksNS Bibliography Keep sort Document Options Build full virtual documents from the schema Build only first level of each document for large schema where many portions will not be used Mapping Options Build Mapping Classes a gt D lt Back Next gt Cancel Finish Figure 2 8 Select XML Schema Dialog Step 7 Move the available schema root elements you want to become virtual documents in the new model over to the Virtual Documents list by using the arrow button D for selected DY elements or the D button to move all elements Step 8 Select the appropriate document options and mapping options Click Finish e Step 9 Click Finish to create a model of all selected document entities or optional click Next gt to view Selected Documents Statistics page which shows document entity statistics and gives you an idea the size of the model being created New Model Wizard Selected Documents Statistics This is an overview of the documents to be generated Select Next to preview and edit the document or Anish to create the document with default settin
22. Figure 10 54 VDB Data Roles Tab 182 Chapter 10 Teiid Designer Ui Reference 10 3 2 2 Editing Translator Overrides Telid Designer provides a means to create edit and manage translator override properties specific to a VDB via the Tranlator Overrides tab A translator override is a set of non default properties targeted for a specific source model s data source So each translator override requires a target translator name like oracle db2 mysql etc and a set of non default key value property sets The VDB Editor contains a Tranlator Overrides section consisting of a List of current tranlator overrides on the left a properties editor panel on the right and Add and Remove action buttons on the lower part of the panel Model Path 03 8 Source Name Translator JNDI Name Description Products xmi UpdateVGTest Products oracle Products MB Updates xmi UpdatevGTest YY GB amp Data Roles VDB Description M i Core no Overridden Translators oracle 1 Description Database Version Execution Factory Class name org teiid translator jdbc oracle OracleExecutionFacton Is Immutable E7 true Max number of dependent values across all IN i 50 Max number of IN predicate entries 1000 Max Prepared Insert Batch Size i 2048 name translator oracle property Requries Criteria false Supported Join Criteria ANY Supports Full Outer Joins E false bar bd Property Value A Base Tanslator Type Name oracle Dat
23. Hat JBoss Developer Studio 4 1 Teiid Designer User Guide To create relational tables from imported text file metadata Perform Steps 1 through 3 above and select the Relational Tables import type then click Next gt Import Metadata From Text File Select Import Type Select the type of text file import desired Import Type Relational Tables iv Purpose Imports relational schema catalogs tables columns and indexes from a CSV text file into a relational model 1 Schema Catalog and Table data is expected to be of the form gt gt TYPE i e SCHEMA CATALOG or TABLE Name Description Optional Location Optional gt gt Locations are of the form ProjectName FolderName ModelName SchemaName gt gt If the project folder model or schema catalog containers do not exist they will be created 2 The Column data is expected to be in the form gt gt COLUMN ColumnName JDBCType Length Description 3 Column data rows for each table must appear immediately following the table data row 4 The Index data is expected to be of the form gt gt INDEX IndexName Type Uniqueness Tablespace Column 5 Index data rows must appear immediately following the table column data rows A sample of typical input data is shown below Sample Fle Format CATALOG Catalog 1 Catalog 1 Description Project_1 MyModel_1 E SCHEMA Schema_l Schema_1 Description Project_1 MyModel_1 Catalog_1 Figure 3 27 Sel
24. Input Set Editor XML The Input Set represents a special class that contains attributes from a parent mapping class When you create mapping classes for an XML Document model the Teiid Designer automatically adds an Input Set to all XML transformation diagrams for mapping classes beneath the highest node in the Document meta object The Input Set proves especially useful for information integration using the Teiid Designer Server Through the Input Set you can access a row of data generated by any XML transformation in a mapping class higher in the XML document s hierarchy You can use Input Set attributes which are individual columns from the rows of data within the criteria of an XML transformation query of the child mapping class You cannot use the Input Set attributes within the SELECT portion of the XML transformation query To use an Input Set you must use the Input Set Editor to bind attributes from parent classes Once you have created an Input Set you can use the attributes within it as source material for the XML transformation diagram s query The Input Set only serves to enable data flow between nested mapping classes If you use the Telid Designer Server for data access your applications cannot directly query an Input Set Input Sets 92 Chapter 4 Creating and Editing Model Objects only dis play in the XML transformation diagram to which they belong Input Sets do not dis play on the as for source classes in othe
25. Model Editor contains sub editors which provide different views of the data or parts of data within an XMI model These sub editors specific to model types are listed below Diagram Editor All models except XML Schema models Table Editor All models Simple Datatypes Editor XML Schema models only Semantics Editor XML Schema models only Source Editor XML Schema models only The VDB Editor is a single page editor containing panels for editing description model contents and data roles In addition to general Editors for models there are detailed editors designed for editing specific model object types These object editors include Transformation Editor Manages Transformation SQL for Relational View Base Tables Procedures and XML Web Service Operations Choice Editor Manages properties and criteria for XML choice elements in XML Document View models Input Editor Manages Input Set parameters used between Mapping Classes in XML Document View models Recursion Editor Manages recursion properties for recursive XML Elements in XML Document View models Operation Editor Manages SQL and Input Variables for Web Service Operations 10 3 1 Model Editor 169 Sad Lint TD Aaa Dacal annar Oe Aina A 4 OTA A Mane ae ew I bene Orisa Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide The Model Editor is comprised of sub editors which provide multiple views of your data The Diagram Editor provides a graph
26. OK to create the WAR file Users macuser WARFiles Figure 5 13 Generate a JBossWS CXF War Web Service Dialog 109 d Hat JBoss Developer Studio 4 1 Teiid Desigqnel Table 5 1 Field Descriptions Field Name Name Host Port Connection JNDI Name Security options Target namespace MT OM Message Transmission Optimization Mechanism War File Save Location Description The name of the generated war file The server host name or IP The server port The JNDI connection name to the deployed Telid source VDB None no username password required to connect to the VDB through the generated web service HTTP Basic the specified security realm and role will be used The default realm value is the realm that comes out of the box with Telid telid security The role needs to be defined in the appropriate security mechanism In the case of T eiid use the telid security roles properties file When using HTT PBasic a local T eiid connection using the PassthroughAuthentication property is required See the Telid user s manual for details on PassthroughAuthentication WS Security a password callback class will be generated for you which will validate that the username password values you specified in the war generator dialog are passed in This is meant to be a testing mechanism for your WS Security enabled web service and your own security mechanism should be implemented in this class All source code is
27. Relational View Table Metadata From Text File 3 5 3 Import Datatypes Metadata From Text File 3 6 Import WSDL into Relational Source Model 3 7 Import WSDL Into Web Service 3 7 1 Import WSDL From Workspace Location 3 7 2 Import WSDL From File System Location 3 7 3 Import WSDL From URL 3 8 XSD Schema File Chapter 4 Creating and Editing Model Objects 4 1 Creating New Model Objects 4 1 1 New Child Action 4 1 2 New Sibling Action 4 1 3 New Association Action 4 2 Model Object Editors 4 2 1 Transformation Editor 4 2 1 1 Using the Criteria Builder 4 2 1 2 Using the Expression Builder 4 2 2 Input Set Editor XML 4 2 3 Choice Editor XML 4 2 3 1 Using the Choice Editor 4 2 3 2 Excluding Fragments 4 2 3 3 Editing Choice Criteria 4 2 3 4 Setting Choice Element Order 4 2 3 5 Setting a Default Choice Action 4 2 4 Recursion Editor XML 4 2 4 1 The Editor 4 2 5 Operation Editor Chapter 5 Metadata specific Modeling 0 ccc cee eee 5 1 Relational Source Modeling 5 1 1 Source Function 5 2 Relational View Modeling 5 2 1 Create Materialized Views 5 3 XML Document Modeling 5 3 1 Create XML View Documents from schema 5 4 Web Services Modeling 5 4 1 Create Web Service Action 5 4 2 Web Services War Generation 5 4 2 1 Generating a JBossWS CXF War 5 4 2 2 Generating a REST Easy War Chapter 6 Editing Models and Projects 0 c cee 6 1 Rename A Model
28. This meta object represents a single distinct bit of metadata information We alluded to its parent table StreetAddress These meta objects and others that would describe the other tables and columns within the database would all combine to form a Source Metadata model for whichever enterprise information system hosts all the objects You can have Source Models within your collection of metadata models These model physical data storage locations You can also have View Models which model the business view of the data Each contains one type of metadata or another For more information about difference between Source and 1 3 4 Business and Technical Metadata Metadata can include different types of information about a piece of data Technical metadata describes the information required to access the data such as where the data resides or the structure of the data in its native environment Business metadata details other information about the data such as keywords related to the meta object or notes about the meta object Note that the terms technical and business metadata refer to the content of the metadata namely what type of information is contained in the metadata Don t confuse these with the terms physical and 1 3 4 1 Technical Metadata Technical metadata represents information that describes how to access the data in its original native data storage Technical metadata includes things such as datatype the name of the da
29. To preview a relational table or view with access pattern 124 Chapter 7 Testing Your Models that contains an access pattern The table or view can be in a view model as well as a source model Step 2 Right click select the Preview Data action 3 You can also select the same action in Step 3 Acolumn input dialog is presented Select each access pattern and enter a value for each required column Note that if data entered does not match the column datatype String integer etc an error message will be displayed in the dialog header When all required values are entered click the OK button to execute the query a Preview Data To preview data from this table select an access pattern and provide a value for each required column All access pattern column values are set Select OK to continue Access Patterns Required Columns Al NameAndID PUBLISHER_ID long 20022 NAME string 255 Mifflin E Figure 7 5 Access Pattern Column Input Dialog 7 2 5 Preview Relational Procedure To preview a relational procedure The procedure can be in a view model as well as a source model Step 2 Right click select the Preview Data action You can also select the same action in Step 3 An input parameter input dialog is presented Enter a valid value for each parameter Note that if data entered does not match the parameter datatype String integer etc an error message will be displayed in the dialog header Whe
30. WSDL Operations Selection Press the Next gt button to continue or the Anish button to finish Select the desired WSDL Operations ww Definitions file tmp terraservice23962930517375020849 wsdl vw TerraServiceSoap ge ConvertLonLatPtloNearestPlace Deselect All 3 ConvertLonLatPtToUtmPt ae ConvertUtmPtToLonLatPt 3 ConvertPlaceToLonLatPt CountPlacesinRect ae GetArearromPt a GetAreaFromRect a GetAreaFromtileld 3 GetLatLonMetrics ag GetPlaceFacts ae GetPlaceList i GetPlaceListinRect dep GetTheme de GetTileMetaFromLonLatPt de GetTileMetaFromtTileld de GetTile Select All lt Back I Next gt Cancel Figure 3 56 Namespace Resolution Dialog Step 7 The last page titled XML Model Generation allows you to change the name of the XML View model if the Generate virtual XML document model is checked Input desired name or use the default name provide Select Finish to complete Create Web Service from WSDL File Schema Workspace Location Selection All workspace schema locations are valid Click Next to continue Schema Location Information tay Namespace Source File Target Path 4 Editor http terraservice usa com http terraservice usa com tmp terraservice2 WSDLImportProject terraservice23962930517375020849 xsd Folder WSDLImportProject Name without file extension terraservice23962930517375020849 Figure 3 57 Nam
31. Warning 2 Missing precision property on columns with numeric types Warning gt Columns of builtin type integer Warning a Name in source conflicts with sibling entities Ignore Indexes with columns from more than one table Warning gt Empty transformations Error a Figure 9 10 Relational Model Validation Preferences Panel Validation Cov v Specify the Severity Level for walidation related occurrences XML Validation Control Settings XML Document Elements Attributes not referencing an XML Schema component Warning lt gt Excluded Element from XML Document required by XML Schema Warning lt gt XML document entity violates max occurs specified by its schema component Warning Unmapped required XML element or attribute Error Excluded Elements Attributes from XML Document are mapped Warning 2 Mapped XML Element Attribute has fixed or default value Warning Mapped XML Elements Attributes with zero minimum occurrences Ignore F Mapped XML Elements Attributes with one maximum occurrence Warning XML Root Element mapped to Mapping Class Warning Mapped XML Elements Attributes Nillable Ignore Incompatible Datatypes for Colurnn to Element Attribute Mappings Warning Restore Defaults Apply Figure 9 11 XML Document Model Validation Preferences Panel validation ow Specify the Severity Level for validation related occurrences
32. Window Help Open Projec Close Project ay Build All Ctrl B Build Project Build Working Set Clean Build Automatically Clone Project Build Project Imports Build All Imports Build Packages Va Validate Model Transformations Properties Figure 6 9 Clone Project In Project Menu e Step 3 On the Clone Project wizard page provide a name for your new project 120 Chapter 6 Editing Models and Projects Clone Model Project Clone Model Project Specify cloned model project name Project name ValuedCustomerAccounts Use default location Cancel Figure 6 10 Clone Project In Project Menu Step 4 Optional If you wish to create your cloned project in a location other than your default workspace location uncheck the Use default location check box and specify type in or browse to a new directory location on your local file system Step 5 Click Finish to generate your new project 121 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 7 Testing Your Models As described briefly in Chapter 1 you can test your models in Telid Designer by using the Preview Data action SF or test your models via your deployable VDB These two options will be described in detail in this chapter as well as managing your required connection profiles 7 1 Manage Connection Profiles Teiid Designer utilizes the Eclipse Datatools Connection Profile framework for connection mana
33. database functions within View transformations a new New Child gt Source Function action and wizard was added to assist in building a source procedure that conforms to a function structure including input and output parameters Prior to Telid Designer 7 5 these functions were required to be modeled as User Defined functions Running the action will display the Create New Source Function dialog Enter your database function name define input parameters including datatype and length specify output parameter info set options and click OK or PartsSupplier xmi el ae New gt gt import declarations 2 New Child E Base Table ta Package Diagram FEET odelin gt R SHIP_VIA Dpen E Procedure gt R STATUS Open With gt H view p R SUPPLIER E Source Function gt R SUPPLIER PARTS 1 Copy b gt HF getPartinfo ta Custom Diagram gt J Data Source Figure 5 1 New Source Function Action The resulting source function will be added to your model and will be represented by the icon 100 Chapter 5 Metadata specific Modeling Create Source Function Create New Source Function Press OK to finish getEmployeelnfo Input Parameters Include Name Length employeelD integer sting e string string string Return Parameter Name Data Type Length employeelnfo 65532 Properties Descriptior Figure 5 2 Create New Source Function Dialog When finished the new source function will be displaye
34. enable if the cursor position is within a query that allows a criteria Pressing the button will launch the Criteria Builder dialog If the Criteria Builder is launched inside an existing criteria that criteria will be displayed for edit otherwise the Criteria Builder will be initially empty Expression Builder allows you to build an expression within your transformation The button will enable if the cursor position is at a location that allows an expression Pressing the button will launch the Expression Builder dialog If the Expression Builder is launched inside an existing expression that expression will be displayed for edit otherwise the Expression Builder will be initially empty Expand Select allows you to expand a SELECT clause into a SELECT clause which contains all of the SELECT symbols The button will enable only if the cursor is within a query that contains a SELECT clause that can be expanded A Increase Font Size increases the font size of all editor text by 1 Decrease Font Size decreases the font size of all editor text by 1 Show Hide Messages toggles the display of the message area at the bottom of the transformation editor Optimize SQL when toggled ON will use the short names of all SQL symbols that can be optimized Some symbol names may remain fully qualified in the event of a duplicate name or if the optimizer is unable to optimize it When the action is toggled OFF all symbol nam
35. existing or previous connection profile from the drop down selector or press New button to launch the New Connection Profile dialog See Eclispe Data Tools documentation or Edit to modify change an existing connection profile prior to selection Note that the Connection Profile selection list will be populated with only JDBC Database connections Import Database via JDBC Select a JDBC source configuration E a Select the JOBC source configuration for the database to be imported into a relational model Connection Profile eee eaea JDBC Metadata Proces Properties Driver URL User Name Password Figure 3 6 Select JDBC Source Configuration Dialog 39 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Because JDBC databases are different special processing of your metadata to be required in order to convert datatypes or to interpret your metadata The JDBC Metadata Processor drop down selector will be auto selected based on your selected connection profile Special processors are available for DB2 Modeshape ODBC Oracle PostgeSQL SQL Server and Sybase For all other DB s ajdefault JDBC processor is available Step 4 After selecting a Connection Profile input password if not provided Press Next gt or Finish gt if enabled Import Database via JDBC Select a JDBC source configuration Press the Next gt button to continue or the Anish button to finish Connectio
36. gt if enabled Chapter 3 Importers Create Relational Model from SalesForce Data Model Target Model Selection Press the Next gt button to continue or the Anish button to finish Select Target Relational Model Model Name BillingSourceModel Browse Location Salesforcelmportlest Browse Select Import Options _ Model audit fields Selecting this option will cause the importer to model the Audit Relds for each SalesForce object Created By Created Date Last Modified By Last Modified Date System Modification Timestamp C Do not gather Cardinalities Selecting this option will stop the importer from calculating and setting the cardinalities metadata For large salesforce applications this can become a long running operation Gather Column Distinct Value Count Selecting this option will cause the importer to calculate and set the distinct value count metadata This will scan the data in each field individually and can be a very long running operation Set name to SalesForce label Selecting this option will cause the importer to set the name metadata in the generated model 1 By default the importer uses the internal data name because SalesForce labels are often invalid f Create a procedure for the GetUpdated operation Selecting this option will cause the importer to create a procedure for the getUpdated operation ir Create a procedure for the GetDeleted operation Selecting this option
37. included in the generated war along with the compiled class files This is the target namespace that will be used in the generated WSDL and subsequent generated web service classes If selected MT OM will be enabled for the web service endpoint s You will also need to update your output schema accordingly by adding the xmins xmime http www w3 org 2005 05 xml mim schema and adding type xs base64 Binary xmime expectedContentT ypes application oc tet stream to the output element you wish to optimize The folder where the generated WAR file should be saved Step 3 Click OK to generate the web service war When war generation is complete a confirmation dialog should appear Click OK Chapter 5 Metadata specific Modeling The WAR file PortfolioVDB was successfully created Figure 5 14 Generation Completed Dialog 5 4 2 2 Generating a RESTEasy War In Telid Designer it is also possible to expose your VDBs over REST using a generated REST Easy war Also if your target virtual model has update insert and delete SQL defined you can easily provide CRUD capabilities via REST Accepted inputs into the generated REST operations are URI path parameters and or XML JSON JSON is exposed over a URI that includes json For example http host port war_context model_ name resource will accept URI path parameters and or XML while http host port war_context model_name json resource will accept URI p
38. into another Datetime for functions that handle date or time information Miscellaneous for other functions Numeric for mathematic and other numeric functions String for string manipulation functions Any additional categories represent those containing user defined functions your site has created Chapter 4 Creating and Editing Model Objects a Step 5 From the Function drop down list select the function you want The table beneath the drop down lists displays the number of arguments required for this function e Step 6 Click Apply e Step 7 Your function displays in the tree at the top Sub nodes display for each argument you need to set for this function 3 Expression Builder Initial Expression lt undefined gt ee SaL View lt 7 A CONCAT Books SourceB AUTHORS FIRSTNAME lt undefined gt Books SourceB AUTHORS FIRSTNAME 2 gt zundefined gt Expression Editors Attribute Constant Function Choose Attribute below to replace selected cundefined gt Books SourceB AUTHORS FA Books SourceB AUTHORS AUTHOR _ID A Books SourceB AUTHORS FIRSTNAME FA Books SourceB AUTHORS LASTNAME FY Books SourceB AUTHORS MIDDLEINIT lt E InputSet tj INPUT isbn Books SourceA BOOK AUTHORS E Books SourceA BOOK_AUTHORS ISBN El Books SourceA BOOK AUTHORS AUTHOR_ID Figure 4 20 New Blank Function Created You need to set an attribute or constant value for each sub node in the tree to specify the ar
39. launch the Criteria Builder dialog Step 3 Use the Criteria Builder to create the conditions for which the Teiid Designer Server will test to determine whether to choose this option in the XML instance document Step 4 Click OK The criteria you set displays both in the table and in the summary tab You must set a criterion for each option in your document unless you have selected to exclude that option or specify that option will be the default option 4 2 3 4 Setting Choice Element Order To edit the criteria for a choice element The Telid Designer Server evaluates the choice criteria in the order in which they appear and when one choice criteria is met the Telid Designer Server populates the XML instance document with that option The Telid Designer Server might not test all criteria for all options so their order matters a great deal Therefore the order in which your options appear within the choice criteria often determines what information appears ultimately in your XML instance documents You can reorder the option list within the choice to set the order in which the Teiid Designer Server tests the criteria l A Rz mps To set this order select an element in the table and use the or button to move it into a new position in the table The new order displays both in the table and in the Choice Criteria box and reorders the XML document as well 4 2 3 5 Setting a Default Choice Action The default action represents the cou
40. menu a Step 4 Select Datatype Model from Model Type drop down menu e Step 5 Click Finish z Note You can change the target location i e project or folder by selecting the Browse button and selecting a project or folder within your workspace In addition to creating a new empty xml schema model the following builder option is available a Copy from existing model of the same model class 2 4 1 Copy From Existing Model 29 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide This builder option performs a structural copy of the contents of an existing model to a newly defined model You can choose a full copy or select individual model components for copy To create a new relational model by copying contents from another xml schema model complete Step 5 Select the model builder labeled Copy from existing model of the same model class and click Next gt The Copy Existing Model dialog will be displayed Step 6 Select an existing relational model from the workspace using the browse button Step 7 Check the Copy all descriptions option if desired Click Finish New Model Wizard Copy an Existing Model Select an existing model to be copied Existing Model USCustomers xmi Model Contents gt H ACCOUNT gt E ACCOUNTHOLDINGS gt E CUSTOMER gt O Data Source Copy all descriptions Cancel Figure 2 11 Copy An Existing Model Dialog 2 5 Creating Web Service View Mod
41. name of the character in the Search field and click Next The character you sought will be highlighted in the Character Table Double click this highlighted character to place it in the Text to copy field and then click the Copy button Now switch back to your document and choose Edit Paste fromthe gedit menu bar The above text includes application names system wide menu names and items application specific menu names and buttons and text found within a GUI interface all presented in proportional bold and all distinguishable by context Mono spaced Bold Italic or Proportional Bold Italic Whether mono spaced bold or proportional bold the addition of italics indicates replaceable or variable text Italics denotes text you do not input literally or displayed text that changes depending on circumstance For example To connect to a remote machine using ssh type ssh username domain name at a shell prompt If the remote machine is example com and your username on that machine is john type ssh John example com The mount o remount file system command remounts the named file system For example to remount the home file system the command is mount o remount home To see the version of a currently installed package use the rpm q package command It will return a result as follows package version release Note the words in bold italics above username domain name file system package version and release Each word is a placeho
42. of the same model class 2 6 1 Copy From Existing Model This builder option performs a structural copy of the contents of an existing model to a newly defined model You can choose a full copy or select individual model components for copy To create a new relational model by copying contents from another extensions model complete a Step 5 Select the model builder labeled Copy from existing model of the same model class and click Next gt The Copy Existing Model dialog will be displayed Step 6 Select an existing relational model from the workspace using the browse button a Step 7 Check the Copy all descriptions option if desired Click Finish 33 34 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide New Model Wizard Copy an Existing Model Select an existing model to be copied Existing Model USCustomers xmi WATHOLBINGS gt E CUSTOMER gt D Data Source Copy all descriptions Figure 2 15 Copy An Existing Model Dialog Finis h Chapter 3 Importers Chapter 3 Importers The Import Wizard provides a means to create a model based on the structure of a data source to convert existing metadata i e WSDL or XML Schema into a source model or to load existing metadata files into the current VDB To launch the Import Wizard choose the File gt Import action or select a project folder or model in the tree and right click choose Import Select Choose import source
43. of times the elements are nested within the document You can set the following conditions to limit the recursion A fixed number of results to the query A SQL based criteria limit condition A combination of both To open the Recursion Editor click on the Recursion Editor button on the displayed mapping class Chapter 4 Creating and Editing Model Objects zE EMployee 4 LastName string rsthame si Eng 1 MiddleInitial string Figure 4 27 Open Recursion Editor Button Recursion Editor Supervisor M Enable Recursion d x Count Limit 5 Action When Count Limit Exceeded THROW w Limit Condition Edit EmployeeDocs EmployeeDocument MappingClasses Supervisor name Joe Smith Figure 4 28 Recursion Editor To edit recursion properties Step 1 Click the Enable Recursion check box if you want the T elid Designer Server to perform the query you specify to generate the nested tags within the XML document Step 2 Click the arrows beside the Count Limit box to limit the number of times to recursively perform the query If you do not set a Limit Condition in the text area the recursion finishes when the query reaches this limit You can only set this limit to a maximum supported by your Telid Designer Server For more information about this limit contact your system administrator Step 3 Click the Action When Count Limit Exceeded drop down menu to instruct the T eiid Designer Server
44. open in an editor a dialog may appear confirming the attempt to modify the model and asking the user to confirm or cancel This dialog can be prevented by checking the preference Always open editor without prompting You can re set uncheck this property via the Teiid Designer s main preference page GE Open Model Editor You must open this model in an editor tab before you can modify the property wy value Do you want to open the editor Always open editor without prompting Figure 10 17 Open Model Editor Dialog Properties can also be edited via a right click menu presented below Value nt la 1 WO 5UPPLIER_NA ipe i a TA SUPPLIER_NA CUE ka Da 1 H5 Copy E Paste le o string Path i Delete LA Varchar T NULLABLE amp Select All je SOL Input Methods gt Ir i false Insert Unicode Control Character gt ink OR true zy dnt Figure 10 18 Open Model Editor Dialog I The Properties toolbar contains the following actions amp Show Categories toggles between categorized properties and flat alphabetical properties list P Show Advanced Properties shows hide advanced properties if available Restore Default Value for a selected property this action will reset the current to a default value if available 10 2 5 Description View The Description View provides a means to display and edit add change or remove a description for any model or model object To show
45. resolving queries from your client applications This run time metadata represents a static version of design time metadata you created or imported This snapshot is in the form of a Virtual Database definition or VDB As you create this runtime metadata the T elid Designer derives the runtime metadata from a consistent set of metadata models creates a subset of design time metadata focusing on the technical metadata that describes the access to underlying enterprise information systems optimizes runtime metadata for data access performance You can continue to work with the design time metadata but once you have created a runtime metadata model it remains static Dan Liat Dncacc aisTaAlninar CtIdnin A 1 aiid D acinnar licor Giiida Red Hat JBoss Developer Studio 4 1 Telia Des oner User GUIde 1 3 6 Source and View Metadata In addition to the distinction between business and technical metadata you should know the difference between Source Metadata and View Metadata Source and View metadata refer to what the metadata represents not its content Source Metadata directly represents metadata for an enterprise information system and captures exactly where and how the data is maintained Source Metadata sounds similar to technical metadata but Source Metadata can contain both technical and business metadata When you model Source Metadata you are modeling the data that your enterprise information systems contain View Met
46. retrieving your data and returning a result set Each data file will analized and validated based on a set of parser settings You can view the details via the Edit Parser Settings button If the validation fails an Error Status will be displayed instead of OK and you will be required to fix the errors in order to proceed with importing that data file You are encouraged to view the parser settings for ALL your data files to insure that header information column names etc are what you expect The Teiid Data File Parser Settings dialog shown below contains the various parser settings and TEXT TABLE method and parameter options The File Contents Preview section displays a portion of the raw file contents If your data is character delimited default choose the delimiter character in Delimiter Options section If User header for column names check box is selected the dialog will attempt to parse the header line and extract your column names If Fixed Width option is selected no header is expected and you are requried to specifiy the number of data columns their names data types and width of each column Chapter 3 Importers Teiid Data File Parser Settings Define Data File Parser Settings for EmployeeData txt Define header info and verify column names File Contents Preview Number of lines in file 52 Preview number of lines LastName ArstName MiddleName Empld Department AnnualSalary Title HomePhone Marld Street Cit
47. sources View Metadata models not only describe that business view but also illustrate how the meta objects within the View Metadata models derive their information from other metadata models Let s return to the example of our address book database and the vendor s comma separated list We want to generate the View Metadata model Address Pool from these enterprise information systems Address Book Vendor Text Database File 15 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Figure 1 2 Data Flow for View Transformations The transformation that joins these metadata models to create the virtual Address Pool metadata model contains a SQL query called a union that determines what information to draw from the source metadata and what to do with it The resulting Address Pool contains not only the address information from our Address Book database but also that from our vendor supplied text file 1 3 6 3 2 SQL in Transformations Transformations contain SQL queries that SELECT the appropriate attributes from the information sources For example from the sources the transformation could select relevant address columns including first name last name street address city state and ZIP code Although the metadata models could contain other columns and tables such as phone number fax number e mail address and Web URL the transformation acts as a filter and populates the Address Pool metadata model with only t
48. to diagram for parent object if available BY Preview Data Executes a simple preview query SELECT FROM i Save Diagram as Image Save the diagram image to file in JPG or BMP format a Modify Diagram Printing Preferences Modify page layout information for printing diagrams Includes margins orientation etc a ShowlHide Page Grid Show current page boundaries as grid in diagram Context menus provide a flexible means to edit model data especially from Package Diagrams Each Package Diagram represents the contents of some container i e Model Category Schema etc SO New Child New Sibling and New Association actions are almost always available in addition to standard Edit actions Delete Cut Copy Paste Rename Clone A sample context menu for a relational base table is shown below 171 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide New Child New Sibling New Association Modeling P Undo Delete multiple objects Reda of Cut Ctrl x Copy Ctrl C Paste Ctrl V Clone Copy Name 3 Delete Rename Edit Link Types E9 Refresh Diagram Show Parent Diagram a Sawe Diagram To Ale Page Setup Show Page Grid Input Methods Figure 10 37 Package Diagram Context Menu 10 3 1 1 2 Custom Diagram The Custom Diagram represents a view of user defined model objects Unlike Package Diagrams Custom Diagrams can contain objects that are not only unrelated but can be from different conta
49. to single attributes and elements within the input contents other variable declarations and assignments must be typed directly into the Procedure section Clicking the Edit link will display the following dialog 98 Edit Input Variables Request Document Check a request document component to define an input variable for the Web Service procedure Uncheck a request document component to delete an existing input variable wv e bookCollection BooksNS BookSetNested v J 8 book BooksNS BookNested o isbn BookTypesNS ISBN O title xsd string e subtitle xsd string e edition BookTypesNS BookEdition gt E authors BooksNS Authors gt C E publishinginformation BooksNS PublishingInformation XPath for IN_title bookCollection book title Figure 4 30 Edit Input Variables Dialog Chapter 4 Creating and Editing Model Objects Input Variables Select an input variable to see the XPath that will be used to select its value from the request document IN_author string IN_edition string IN_isbn string IN_publishDate string IN_publisher string IN_subtitle string IN_ title string 99 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 5 Metadata specific Modeling This chapter discusses various features targeted at defining and managing metamodel specific objects 5 1 Relational Source Modeling 5 1 1 Source Function To improve ability to utilize
50. will cause the importer to create a procedure for the getDeleted operation in Cancel Anish Figure 3 22 Target Model Selection Dialog a Step 5a If you are updating an existing relational model the next page will be Review Model Updates page Any differences Press Finish gt to create your models and tables 51 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Create Relational Model from SalesForce Data Model Review Model Updates Review the changes that will be applied to your model to bring it up to date with the source metadata Uncheck any changes you do not wish to apply Only In Old Model aLr Changes 4 Only In New Model NEw ad file TestSF 1314365845645 temp xmi mar Salesforce Selection Details salesforce this selection is an Addition Figure 3 23 Review Model Updates Dialog When finished the new or changed relational model s package diagram will be displayed showing your new tables fis Package Diagram Table Editor Figure 3 24 New Saleforce Tables Diagram 3 5 Import Metadata From Text File The Telid Designer provides various import options for parsing comma delimited text file metadata 52 Chapter 3 Importers into models This is accomplished via the Import gt Teiid Designer gt Designer Text File gt gt Source or View Models option Step 1 In Designer choose the File gt Import action t in the toolbar or select a project folder or m
51. 1 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide w i gt TwoSourceParts Og PartsDB2 xmi gt import declarations 2 ih ta Package Diagram A gt H PaRTS v SHIP VIA A SHIPPER ID bigdecimg SHIPPER_NAME string F PK_SHIP_VIA v E status New Child New Sibling New Association Modeling A STATUS _ID bigdecim EY STATUS_NAME string lt 1 Undo Delete multiple objects F PK_STATUS Redo gt E SUPPLIER b SIIPPIIFR PARTS of Cut Ctrl X Figure 4 9 New Association Action In Model Explorer e Step 3 The new relationship link is displayed in the diagram e Step 1 Select two objects you wish to associate For example select columns in different base tables e Step 2 Right click From the pop up menu select New Association gt Foreign Key Relationship s Step 3 The new relationship link is displayed in the diagram The Column Foreign Key Primary Key reference properties are properly set on the selected columns new primary key and new foreign key OR e Step 1 Select a column in table e Step 2 Drag the column to another table and drag over a column and drop onto this column The target column should highlight in Yellow e Step 3 The new relationship link is displayed in the diagram The Column Foreign Key Primary Key reference properties are properly set on the selected columns new primary key and new foreign key a Step 1 Select two objects y
52. 3 redhat Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Provides information on how to use the Telid Designer tool Edition 4 1 1 Barry LaFond Dan Florian John Doyle Ted Jones Mark Drilling Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide Provides information on how to use the Telid Designer tool Edition 4 1 1 Barry LaFond blafond redhat com Dan Florian John Doyle Ted Jones Mark Drilling Legal Notice Copyright 2011 Red Hat This document is licensed by Red Hat under the Creative Commons Attribution ShareAlike 3 0 Unported License If you distribute this document or a modified version of it you must provide attribution to Red Hat Inc and provide a link to the original If the document is modified all Red Hat trademarks must be removed Red Hat as the licensor of this document waives the right to enforce and agrees not to assert Section 4d of CC BY SA to the fullest extent permitted by applicable law Red Hat Red Hat Enterprise Linux the Shadowman logo JBoss MetaMatrix Fedora the Infinity Logo and RHCE are trademarks of Red Hat Inc registered in the United States and other countries Linux is the registered trademark of Linus Torvalds in the United States and other countries Java is a registered trademark of Oracle and or its affiliates XFS is a trademark of Silicon Graphics International Corp or its subsidiaries in the United States and or other countries
53. 30 QUANTITY short El SUPPLIER_STATUS short El SHIPPER_ID short El SUPPLIER_CITY string 30 El SUPPLIER_STATE string 2 Ba ES ES ES ES ES ES Ee 3 F FK_SPLIER_STATS P PK_SUPPLIER E o 4 Transformation Diagram Table Editor Figure 10 39 Transformation Diagram Example Transformation Diagram toolbar actions include E9 Refresh Diagram Re draws diagram I Show Parent Diagram Navigates to diagram for parent object if available WY Preview Data Executes a simple preview query SELECT FROM E Add Transformation Sources Add selected sources to transformation iu Add Union Transformation Sources Add selected sources as union sources 173 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide EJ Remove Transformation Sources Removed sources selected in diagram from transformation t Clear Transformation Remove all sources from transformation a Open Transformation Reconciler dialog iH Save Diagram as Image Save the diagram image to file in JPG or BMP format Modify Diagram Printing Preferences Modify page layout information for printing diagrams Includes margins orientation etc Show Hide Page Grid Show current page boundaries as grid in diagram Context menus for the 10 3 1 1 4 Mapping Diagram The Mapping Diagram represents a view of the mapping between virtual mapping class columns and XML document elements This mapping defines how source data is transform
54. 6 2 Move Model 6 3 Save Copy of Model 6 4 Clone Project Chapter 7 Testing Your Models 0 ccc ees 7 1 Manage Connection Profiles 7 1 1 Set Connection Profile for Source Model 7 1 2 View Connection Profile for Source Model 7 1 3 Remove Connection Profile from Source Model 7 2 Previewing Data For a Model Testing Your Transformations 7 2 1 Preview Relational Table or View 7 2 2 Preview Relational Table With Access Pattern 7 2 3 Preview Relational Procedure 7 2 4 Preview Web Service Operation 7 2 5 Sample SQL Results for Preview Data 7 3 Testing With Your VDB 7 3 1 Creating Data Sources 7 3 2 Execute VDB from Model Explorer 7 3 3 Deploy VDB from Model Explorer 7 3 4 Executing a Deployed VDB Chapters Searching seisrrsranrinanrinag inea a a kane eed i ed a ae aiai 8 1 Finding Model Objects 8 2 Search Models Via Relationship Properties 8 3 Search Transformation SQL 8 4 Search Models Via Metadata Properties Chapter 9 User Preferences ccc a 9 1 Teiid Designer Preferences 9 1 1 Diagram Preferences 9 1 2 Diagram Printing Preferences 9 1 3 Editor Preferences 9 1 3 1 XML Document Preferences 9 1 3 2 Table Editor Preferences 9 1 3 3 Transformation Editor Preferences 9 1 3 4 VDB Editor Preferences 9 1 4 Validation Preferences Chapter 10 Teiid Designer Ui Reference ccs 10 1 Telid Designer Perspectives 10 1 1 Teiid Designer Perspective 10 1 2 Opening a Perspecti
55. 631410 00 or 6314q0000 This definition represents metadata about the ZIP code data in the address book database It abstracts information from the database itself and becomes useful to describe the content of your enterprise information systems and to determine how a column in one enterprise information source relates to another and how those two columns could be used together for a new purpose You can think of this metadata in several contexts 1 3 2 Editing Metadata vs Editing Data The Telid Designer helps you to create and describe an abstract graphic representation of your data structure of your data in the original data sources It also describes whether those data sources are composed of Relational databases text files data streams legacy database systems or some other information type D Developer Studio 4 1 Teiid Designer User Guide rl Red Hat JBoss The Telid Designer allows you to create edit and link these graphically represented meta objects that are really a description of your data and not the data itself So when this documentation describes the process of creating deleting or editing these meta objects remember that you are not in fact modifying the underlying data 1 3 3 Metadata Models A metadata model represents a collection of metadata information that describes a complete structure of data In a previous example we described the field ZIPCode as a metadata object in an address book database
56. A PART WEIGHT string 255 INewColurmn F PK_PARTS E SHIP VIA gt H STATUS Figure 4 2 New Model Object In Explorer e Step 1 Select the parent object to which you want to add a child For example you can add a package to a package or an attribute to a class a Step 2 Right click on a container object From the pop up menu select New Child You can now select the child object you would like to add New Child gt A Access Pattern New Sibling amp Column New Association gt F Foreign Key Modeling F Primar Kev Fy Fi Por PAW ee Undo Create NewColumn W Unique Constraint Redo Figure 4 3 New Child Action In Diagram 5 Step 3 The new model object displays on the diagram and is highlighted for renaming n pa p gt F Figure 4 4 New Model Object In Diagram Step 1 Select the row for the parent object to which you want to add a child For example to add a column click the Base Table tab and select base table row 79 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Step 2 Right click on a table row From the pop up menu select New Child You can now select the child object you would like to add OA PartsViews xmi Base Tables H Columns F Foreign Keys F Primary Keys Location Name Name In Source System Cardinality Supports Ug New Child _ gt l Patter smp VA Aaaa ES Al Access Pattern New Siblin ri mma SUPPLIE
57. ACCOUNT gt E ACCOUNTHOLDINGS gt E CUSTOMER gt O Data Source Copy all descriptions Cancel Figure 2 12 Copy An Existing Model Dialog 2 5 2 Build From Existing WSDL File s or URL This builder option creates a Web service model based on a user defined WSDL file and its referenced schemas In addition applicable XML schema files and XML View document models optional are created To create a new relational model by copying contents from another web service view model complete Step 5 Select the model builder labeled Build from existing WSDL file s or URL and click Next gt 2 5 4 Build From XML Document View Models 31 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Web Service models and their corresponding Interfaces and Operations can be generated in T eiid Designer from XML View model components Namely XML View Documents and XML View Document roots To create a new Web service model from XML components Step 2 Right click select Modeling gt Create Web Service action Step 3 Fill in missing properties in Web Service Generation Wizard shown below Web Service Generation Wizard Generate a Web Service Click Anish to generate the Web Service Click Cancel to abort Specify location for generated modells i e Project or Folder BooksProject Browse Bold Blue text indicates an existing workspace entity Bold Red text indicates an error WebService Mod
58. BYCOLOR colorin END Edit close Figure 8 5 Search Transformations Dialog Step 2 Specify a string segment in the Find field and specify change your case sensitive preference Step 3 Select Perform Search button Any transformation object containing SQL text which contains occurances of your string will be displayed in the results section You can select individual objects and view the SQL If a table or view supports updates and there is insert update or delete SQL present you can expand the object and select the individual SQL type as shown below 137 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Search Tranftormations Input Case Sensitive Perform Search Search Status Search complete for Parts Virtual Tables Views Procedures Operations 3 SQL matches for Parts gt El Supplierinfo lt Table gt PartsProject PartsVirtual xmi gt E partsByColor lt Procedure gt PartsProject PartsVirtual xmi lt v E PARTS lt Table gt PartsProject PartsVirtual xmi SELECT E INSERT 4 gt UPDATE DELETE INSERT SQL String CREATE PROCEDURE BEGIN ROWS UPDATED INSERT INTO PartsSourceB PARTS PartsSoaurceB PARTS PART ID PartsSourceB PARTS PART NAME PartsSourceB PARTS PART COLOR PartsSourceB PARTS PART_ WEIGHT VALUES INPUTS PART ID INPUTS PART NAME INPUTS PART COLOR INPUTS PART WEIGHT END Figure 8 6 Insert SQL Example If you wish to vie
59. Chapter 3 Importers Create Web Service from WSDL File WSDL File Selection Press the Next gt button to continue Web Service Model Name JerraServiceWS Workspace Ale System WSDL Ales http terraservice net terraservice asmx wsdl Figure 3 54 Namespace Resolution Dialog a Step 5 The next page WSDL Operations Selection allows customizing the resulting content of your Web Service model by selecting deselecting various operations and interfaces in the following dialog fata ay Create Web Service from WSDL File Namespace Resolution All namespaces are resolved Select Next to modify the created schemas workspace locations Namespaces dey Namespace http terraservice usa c ami http terraservice net terraservice asmx wsdl Figure 3 55 Namespace Resolution Dialog 71 72 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Step 6 The next page is titted Schema Workspace Location Selection This page lists all schemas imported by the WSDL along with any dependent schemas referenced within schemas as well as schemas embedded in the WSDL and indicates whether or not they are resolvable All resolved schemas will be created in a separate file and added to the workspace The editor panel allows you to change the default file name of the new schema file s If no errors select Next to proceed or Finish to complete with default option Create Web Service from WSDL File
60. E Ale Edit Refactor Navigate Search Project Metadata Run Window Help m 2 CA A a ly E RO Dy Ei Model Explorer 23 SE Outline O Og Northwind xmi x 4 a9 7 CustomerAccounts v Ug Northwind xmi gt import declarations 2 ii Package Diagram gt 4 Alphabetical_list_of_products gt a Categories gt E Category Sales for 1997 gt gt ga Current_Product_List E Customer_and Suppliers by City OH Teid 3 F e EF Y A mms i localhost 31443 gt Data Sources vw VDBs J AmazonBooks 7 Parts E Properties B3 Description amp a zE ta Package Diagram E Table Editor og ey lt m Figure 1 1 Teiid Designer 1 2 Why Use Telid Designer Teiid Designer is a visual tool that enables rapid model driven definition integration and testing of data services without programming With Teiid Designer not only do you map from data sources to target formats using a visual tool but you can also resolve semantic differences Create virtual data structures at a physical or logical level use declarative interfaces to integrate aggregate and transform the data on its way from source to a target format which is compatible and optimized for consumption by your applications resolve semantic differences This allows you to abstract the structure of the information you expose to and use in your applications from the underlying physical data structures With Telid Desi
61. Each metamodel type has a set of parent child relationships that establish constraints on what can be created and where You cannot for example create a column attribute ina stored procedure nor can you create a mapping class column in a Web service operation s output message The Telid Designer provides a common set of actions to create new children of these models as well as children of children New Child Action New Sibling Action New Association Action 4 1 1 New Child Action Step 1 Select the parent object to which you want to add a child For example you can add a package to a package or an attribute to a class Step 2 Right click on a container object From the pop up menu select New Child You can now select the child object you would like to add vr TE TwoSourceParts v ig PartsDB2 xmi gt import declarations 2 Ha Package Diagram gt E SHIP VIA New Child gt Access Pattern tie New Siblin gt gt E staus eee sat E Column ew Association aa gt H SUPPLIER F Foreign Key Modeling gt gt H SUPPLIER 7 an W Unique Constraint gt Og PartsSOL xm Figure 4 1 New Child Action In Model Explorer highlighted for renaming 78 Chapter 4 Creating and Editing Model Objects v a TwoSourceParts v a PartsDB2 xmi import declarations 2 Ha Package Diagram lt v PaRTS El PART ID stringl4 E PART NAME string 255 El PART COLOR string 30 F
62. Guide Chapter 6 Editing Models and Projects Telid Designer offers three basic model edit actions Rename Move and Save As and one project related action Clone Project These actions are described below 6 1 Rename A Model TO rename a model in your workspace Step 2 Right click select the Refactor gt Rename action Ta F i vw fea AllCustomerAccounts gt Ar Northwind xmig T gt tS Book anes i gt BooksProject New Child y gt PartsProject aen Modeling gt gt wspLimportProje ee Open Open With gt Copy TE Paste Ctrl V Paste Special Ctrl V Delete Refactor HS Undo Taa Red tag Import Paa Namespace URI amp Refresh Mowe Figure 6 1 Refactor Rename Action In Model Explorer e Step 3 Specify unique model name in the Rename Model File dialog Click OK Rename Model File Enter new name AllCustomers me ox Figure 6 2 Rename Model File Dialog Note Renaming a model that is a dependency to another model will automatically change the model imports for those models If source model CustomerSource is renamed to OldCustomerSource for instance the import statement for the view model CustomerAccounts which imports CustomerSource will be changed to reflect the new name 116 Chapter 6 Editing Models and Projects
63. Help New Sse iss S Teiid Model Project Open Ale Fy Project Close Ctrl w C Folder Close All shift Ctrl w Teiid Metadata Model g Teiid VDB Fey Example Fey Other Ctrl N Figure 10 60 File Menu The File menu contains the following actions 186 New gt Model Project Create user a new model project C New gt Folder Create new folder within an existing project or folder as New gt Virtual Database Definition Create a new VDB or Virtual Database Definition Open File Enables you to open a file for editing including files that do not reside in the Workspace Close Ctri W Closes the active editor You are prompted to save changes before the file closes Close All Shift Ctrl W Closes all open editors You are prompted to save changes before the files close iG Save CtrI S Saves the contents of the active editor al Save As Enables you to save the contents of the active editor under another file name or location is Save All Shift Ctrl S Saves the contents of all open editors Move Launches a Refactor gt Move resource dialog Rename F2 Launches a Refactor gt Rename resource dialog if resource selected else in line rename is preformed Refresh Refreshes the resource with the contents in the file system Convert Line Delimiters To Alters the line delimiters for the selected files Changes are immediate and persist until you change the
64. ML Views To create a Web service model from relational models or objects a Step 1 Select any combination of relational models tables and or procedures in the It is recommended that the user selects single source models which enables auto naming of input output schema and Web service models in Step 3 Step 2 Right click select Modeling gt Create Web Service action 106 b Ca PartsSourceB xmi e Parts Virtu plasms New gt New Child gt Modeling Create Web Service Open a p Transformations Export SOL Open With gt x m Transformations Import SOL E Teiid 24 b E gt Copy Figure 5 10 Create Web Service Action Generate SOL Relationships Chapter 5 Metadata specific Modeling e Step 3 Inthe Create Web Service dialog specify file names for the generated Input Schema file Output Schema file and Web service model Change options as desired Click Finish when done Create Web Service Create Web Service Click Anish to generate Location Specify location for generated modells i e Project or Folder Browse Output Schema Model Name Parts Output Generate flat XSD Input Schema Model Generate Name Parts_ Input Generate flat XSD Web Service Model Name Parts 0 WS Generate default SOL for XML mappings Anish Cancel Figure 5 11 Create Web Service Dialog e Step 4 Whe
65. Model dialog will be displayed Step 6 Select an existing relational model from the workspace using the browse button Step 7 Check the Copy all descriptions option if desired Click Finish Ge New Model Wizard Copy an Existing Model Select an existing model to be copied Existing Model USCustomers xmi Model Contents gt E ACCOUNT gt E ACCOUNTHOLDINGS gt E CUSTOMER gt O Data Source Copy all descriptions Figure 2 7 Copy An Existing Model Dialog 2 3 2 Build XML Documents From XML Schema This option creates an XML View document model based on a selected XML schema and its dependencies Step 5 Select the model builder labeled Build XML documents from XML schema and click Next gt The Select XML Schema dialog will be displayed Step 6 Select an existing schema model from the workspace using the browse button tO An existing model will be pre selected if an XSD model in the workspace is selected in the VDB explorer prior to starting the new model wizard The schema must be found in the workspace so if you need to get one or more into the workspace use the XSD Schemas on file system importer 27 28 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide cs New Model Wizard Select XML Schema Select XML Schema file then select Schema Root Elements Or press Finish to create an empty XML Document XML Schema Ale BooksProject
66. New Association gt Modeling gt 3 Copy Ctrl C 2 Delete Delete Select All Ctri A Add Bookmark Add Task Figure 10 61 Edit Menu The Edit menu contains the following actions New gt Child This menu is created dynamically to support the creation of whatever types of child objects can be created under the selected object New gt Sibling This menu is created dynamically to support the creation of whatever types of Sibling objects can be created under the same parent as the selected object New gt Association This menu is created dynamically to support the creation of whatever types of associations can be created with the selected object Modeling gt This menu is created dynamically Various modeling operations are presented based on selected model object type Undo Reverses the effect of the most recent command gt Redo Reapplies the most recently undone command ef Cut Deletes the selected object s and copies it to the clipboard E Copy Copies the selected object s to the clipboard D A A LJ nf PR ANCCO J A VJIAINNH ar Cr o In A 1 T C i D AC i MNnNar le Ar AM Ir O Red Hat JBOSS Developer studio 4 1 tenda Designer User Guide 5 Paste Pastes the contents of the clipboard to the selected context Paste Special Provides additional paste capabilities for complex clipboard objects Clone Duplicates the selected object in the same location with the same name User is able to
67. PARTS SUPPLIER_ID PartsSourceB SUPPLIER SUPPLIER_ID Figure 4 13 Editing String Property If this virtual class Supports updates the tabs on the bottom of the Transformation Editor allow you to enter SQL for each type of query this virtual class supports If this virtual class does not support updates only the SELECT tab is available You can enter separate SQL queries on each available tab to accommodate that type of query Within the Transformation Editor you can Disable specific update transformation types on this virtual class Build or edit a criteria clause to use in your transformation Build or edit an expression to use in your transformation Find and replace a string within your transformation Validate the transformation to ensure its content contains no errors Reconcile target attributes to ensure the symbols in your transformation match the attributes in your virtual metadata class You can also set preferences that impact the display of your Transformation Editor For more The Transformation Editor toolbar actions are summarized below iy Prevew Virtual Data executes a simple preview query for the target table or procedure of the transformation being edited F1 Search Transformations provides a simple way select and edit another transformation based SQL text search criteria E Edit Transformation provides a simple way to change which transformation to edit without searching in a diagram or the Model Ex
68. PPLIER v W TABLE SHIP_VIA STATUS SUPPLIER SUPPLIER_PARTS 5 table objectis selected to import Deselect All C Show Only Selected Schemas Se S Figure 3 9 Select Database Options Dialog Step 7 On the Specify Import Options page specify desired Model Name as well as any other options used to customize the naming of your relational objects Press Finish gt to complete 2 Import Database via JDBC Specify Import Options Specify the name location and import options for the new relational model of database PartsOraclell mi Model Name partsOraclell xmi FE Into Folder PartsProject _ Update if existing model selected Include In Model Select whether the following types of objects should be included in the model Model Object Names Select the case conversion that should be performed when assigning source object names to model objects None O Uppercase Lowercase Source Object Names C Empty Unqualified Source Names O Fully Qualified Source Names Cancel Figure 3 10 Specify Import Options Dialog 41 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide During the Finish processing a monitor will be displayed providing feedback on the import progress Progress Information Importing from JDBC database PartsOraclell Processing database object 1 of 5 creating BaseTable PARTS Figure 3 11 JDBC Import Progress Dialog 3 3 Imp
69. Procedures Generate default relational procedures compatible with Teiid Ale translator Select desired procedures and Anish Available File Translator Procedures W getRles path ext return blob getTextRles path ext return clob W saveRle l path value return void Figure 2 2 Generate File Translator Procedures Dialog 2 1 2 Generate Web Service Translator Procedures This builder option allows construction of a relational model containing one or more of the procedures required for accessing web service based XML data via a web s translator To create a new relational model containing web service based translator procedures complete a Step 5 Select the model builder labeled Generate Web Service Translator Procedures and click Next gt The Generate Web Service Translator Procedures dialog will be displayed Step 6 Check one ore more of the Available Web Services Translator Procedures Click Finish 22 Chapter 2 New Model Wizards aA00 New Model Wizard Generate Web Service Translator Procedures Generate default relational procedures compatible with Teiid Web Service translator Select desired procedures and Finish Available Web Service Translator Procedures vi invoke binding in String action in STRING request in OBJECT endpoint in STRING result out XML v invokeHttp action in STRING request in OBJECT endpoint in STRING result out BLOB contentType out STRING lt Back
70. R New Association gt F Foreign Key Modeling gt SUPPLIER ar lt 2 Undo Delete multiple objects W Unique Constraint Figure 4 5 New Child Action In Table Editor Step 3 The selected tab in the Table Editor changes to the tab for the child object type the new model object row is displayed and the row s name table cell is highlighted for renaming 4 1 2 New Sibling Action Step 1 Select the object to which you want to add a sibling For example you can add a column sibling to a column Step 2 Right click on that object From the pop up menu select New Sibling You can now select the sibling object you would like to add ota eines Gecaana cies an H PARTS E n Eid aT STATS New Child gt eee gee PART ere 7 aa ae on a New Sibling a A Access Pattern E E PART IE EY PART_ Modeling gt F PK PA F Foreign Key vo E SHIP_VIA Undo Delete multiple objects E SHIPP W Unique Constraint EY SHIPP Figure 4 6 New Sibling Action In Model Explorer Step 1 Select the object to which you want to add a sibling For example you can add a column Sibling to a column Step 2 Right click on that object From the pop up menu select New Sibling You can now select the sibling object you would like to add 80 Chapter 4 Creating and Editing Model Objects nies cence New Child gt New Sibling A Access Pattern Modeling gt E Foreign Key ra Undo Delete multiple
71. Relational Model Selector dialog where you select an existing relational model or specify a unique name for a new model 103 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Relational Model Selector Dialog Select the Relational Model or schema location within a model in which the entities will be created amp PartsTest gt Gig Northwind xmi b Og PartsSupplier xmi Q PartsTestVDB vdb gt I PartsViewModel xmi b gt Ca ProductsOracle xmi New Model Name Materiali Click OK to create the relational model Properties Cancel e Step 3 Click OK to create relational tables corresponding to your selected view tables and automatically set the Materialized property to TRUE and the Materialized Table reference value to your newly generated table When finished your view tables will be configured with their new materialized properties and the corresponding relational tables will be shown in their package diagram ta Package Diagram E Table Editor Figure 5 6 Materialized Table Properties 5 3 XML Document Modeling 5 3 1 Create XML View Documents from schema You can create XML View Documents by selecting an element in the Model Explorer and selecting the 104 Chapter 5 Metadata specific Modeling Modeling gt Create XML View Documents action v A Books xsd v 5 Books xsd 4 BookDatatypes xsd LLP MetaMatrix Data Set Library Version 1 1 Boo
72. S PART_ID E PartsSourceA SUPPLIER_PARTS QUANTITY E PartsSourceA SUPPLIER_PARTS SHIPPER_ID D gt PartsSourceB SUPPLIER Cancel Figure 4 18 Expression Builder 89 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide The two tabs at the top Tree View and SQL View show the current contents of the expression you have built To build an expression you must specify the type of expression you want to build and populate it In most cases you will use the Expression Builder to construct a complex expression a Step 3 Click the Function radio button to add a function You can simply add constants and attributes as expressions by themselves using the Attribute or Constant radio buttons however the Expression Editor is most useful for functions e Step 4 The Expression Editor displays the Function editor Expression Builder Initial Expression lt undefined gt ia SOL View zundefined gt Expression Editors O Attribute Constant Function Apply to replace selected lt undefined gt with Function below Category STRING Function Argument Name Value STRINGL lt undefined gt STRING lt undefined gt Figure 4 19 Function Panel Selected From the Category drop down list choose the type of function you want to add By default the Teiid Designer System offers the following categories T T T a a 90 Conversion for functions that convert one datatype
73. Select an import source amp Teiid Designer DDL Ale gt gt Source or View Model Designer Text Ale gt gt Source or View Models Eyr Flat Ale Source gt gt Source and View Model JDBC Database gt gt Source Model Y Salesforce gt gt Source Model WSDL Ale or URL gt gt Source Model WSDL Ale or URL gt gt Web Service Model XML Schemas P gt XML Cancel Figure 3 1 Import Wizard 3 1 Import DDL Source relational models can be created by importing DDL You can create relational source models from your DDL using the steps below Step 1 In Model Explorer choose the File gt Import action t in the toolbar or select a project folder or model in the tree and choose Import Step 2 Select the import option Teiid Designer gt DDL File gt gt Source or View Model and click Next gt 35 36 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Select Import DDL into a new or existing relational model Select an import source type filter text gt Team v Teiid Designer If DDL into Relational Model ta Flat Ale Source gt gt Source and View Model D Metadata from JDBC Database ae Metadata from Text Ales on file system XM Salesforce as Relational Source Model ate WSDL into Relational Source Model pf WSDL into Web Service Model S XML Schemas Figure 3 2 Import DDL a Step 3 Select existing DDL from either Choose from file system or Cho
74. Source gt gt Source and View Model Metadata from JDBC Database Metadata from Text Ales on file system NM Salesforce as Relational Source Model WSDL into Relational Source Model a WSDL into Web Service Model S XML Schemas gt E XML Figure 3 45 Import WSDL File Into Web Service Model Step 3 Input a valid name for your Web Service model and select the File System button Locate your file system WSDL file in the selection dialog and click OK gt 65 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Create Web Service from WSDL File WSDL File Selection S Fress the Next gt button to continue Web Service Model Name OnHandws Ale System WSDL Ales fhome blafond Test Designer Folder example files wsdls OnHand wsdl Figure 3 46 WSDL File Selection Dialog s If no WSDL is selected or specified then the importer will only create an empty Web Service model No XML Schema or XML View models will be generated e Any referenced files WSDLs or schemas must either be embedded in the WSDL file or exist on your file system 5 Step 4 The next page is titted Namespace Resolution This page identifies successful and errant WSDL namespace resolution The main WSDL document will essentially always be resolved since the workspace file chooser is used to obtain the path Problems will occur when the main WSDL file imports other WSDL files that cannot be resolved If no errors select Next to proc
75. a file then select Schema Root Elements Or press Anish to create an empty XML Document XML Schema Ale BooksXMLTest Books xsd a Select one or more Schema Root Elements to generate Virtual Documents Schema Root Elements Virtual Documents E bookCollection BooksNS BookSetNested e bibliography BooksNS Bibliography e bookListing BooksNS BookSetFlat e bookSetMixed BooksNS BookSetMixed Reset C Keep sorted alphabetically Document Options Build full virtual documents from the schema Build only first level of each document for large schema where many portions will not be used Mapping Options Build Mapping Classes Mapping Class Locations Locate at XML Schema iteration nodes max occurs gt 1 for schema compliant data access Locate at XML Schema complex types for semantic use only Mapping Class Column Datatypes Use XML types from the document O Use String mapping type disables automatic output conversion to closest built in XSD type lt Bach Next gt Cancel Figure 5 9 Build XML Documents From XML Schema Dialog 5 4 Web Services Modeling 5 4 1 Create Web Service Action This method is recommended for experienced users for consistent and rapid deployment of Web services designed to query relational sources It provides detailed control of all Web service interfaces operations and required transformations from X
76. abase time zone Figure 10 55 VDB Translator Overrides Tab To override a specific translator type select the add translator action If a default Teiid server instance is connected and available the Add Translator Override dialog below is presented the user selects an existing tranlator type and clicks OK Note that the override is only applicable to sources within the VDB so be sure and select a translator type that corresponds to one of the VDB s source models The properties panel on the right side of the panel will contain editiable cells for each property type based on the data type of the property i e boolean integer string etc 183 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Add Translator Override Choose the translator type whose properties you want to override loopback metamatrix modeshape mysql mysqlS olap oracle postgresql salesforce sqlserver sybase Cancel Figure 10 56 Add Translator Override Dialog If no default Telid server instance is available the Add New Translator Override dialog is presented Enter a unique name for the tranlator override i e oracle_override a valid translator type name i e oracle and click OK The properties panel on the right side of the panel will allow adding editing and removing key value string based property sets When editing these properties all values will be treated as type string Add New Translator Override
77. adata on the other hand represent tailored views that transform the Source Metadata into the terminology and domain of different applications View Metadata too can contain both technical and business metadata When you model View Metadata you re modeling the data as your applications and your enterprise ultimately use it 1 3 6 1 Modeling Your Source Metadata When you model the Source Metadata within your enterprise information systems you capture some detailed information including Identification of datatype Storage formats Constraints Source specific locations and names The Source Metadata captures this detailed technical metadata to provide a map of the data the location of the data and how you access it This collection of Source Metadata comprises a direct mapping of the information sources within your enterprise If you use the Telid Designer Server for information integration this technical metadata plays an integral part in query resolution For example our ZIPCode column and its parent table StreetAddress map directly to fields within our hypothetical address book database To extend our example we might have a second source of information a comma separated text file provided by a marketing research vendor This text file can supply additional demographic information based upon address or ZIP code This text file would represent another Enterprise Information System EIS and the meta objects in its Source Mo
78. age Log SQL Results 3 x a 72n Type query expression here Status lt Succee select fror Aug 28 201C Transient org teiid di y Succee select fror Aug 28 201C Transient org teiid d A Operation INSTR_ID NAME TYPE ISSUER EXCHANGE PRD01089 Amazon com Incorporated Stock 2 NasdaqNM PRD01090 Juniper Networks Incorporated Stock PRD01091 l Red Hat Incorporated Stock PRD01092 Boston Scientific Corporation Stock NasdaqNM NasdaqNM NYSE Toronto PRD01093 Inex Pharmaceuticals Incorpora Stock NasdaqNM 3 4 5 1 PRDO1094 Pfizer Inc Stock 2 PRD01095 i Cytovax Biotechnologies Incorpc Stock 3 Toronto PRD01096 Commonwealth Biotechnologies Stock 4 NasdaqSC PRDO1097 British Biotechnology plc Stock 5 NasdaqNM PRDO1220 Unisys Corporation Stock NULL NYSE PRD01099 l Honeywell International Stock 2 NYSE PRDO1100 Hilton Hotels Corporation i Stock 3 NYSE PRDO1101 Hilton Hotels Corporation 4 NYSE PRD01102 Mercury Interactive Corporation Stock 5 NasdaqNM PRD01103 Fidelity Freedom Income Fund 1 4 Melik o mee d VAAN F aoe J Corpor Mutual i aa a i A ae Figure 7 8 SQL Results View 7 3 Testing With Your VDB 126 In Telid Designer you can execute a VDB to test query actual data The requirements for VDB execution are A deployed VDB backed by valid deployed Data Source
79. ams Includes margins orientation etc Context menus for Mapping Transformation Diagrams identical capabilities to the Transformation Diagram with the addition of managing and editing Input Sets 10 3 1 2 Table Editor The Table Editor provides a table based object type structured view of the contents of a model The figure below shows a relational model viewed in the Table Editor Common object types are displayed in individual folders tables All base tables for instance are shown in one table independent of their parentage Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide lia PartsSourceA xmi 3 m Base Tables FY Columns Location Name Name In Source System Cardinality Supports Up Materialized Logical Relat Materialized Object URI PARTS PARTS false 16 true false i i i SHIP_VIA SHIP_VIA false 3 true false STATUS STATUS false 3 true false SUPPLIER SUPPLIER false 16 _ true false SUPPLIER_PA SUPPLIER_PARTS false true false fis Package Diagram E Table Editor Figure 10 42 Table Editor Example You can customize Table Editor properties via Table Editor Preferences These are the primary features of the Table Editor Edit existing properties Add remove or edit objects via the main Edit menu and context menu Cut Copy Paste Clone Delete Rename Insert Rows Paste information from your clipboard into the table Print your tables When a Table Editor i
80. an be used to define a layer of abstraction above the physical or source layer so that information can be presented to end users and consuming applications in 17 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide business terms rather than as it is physically stored Views are mapped to sources using transformations between models These business views can be in a variety of forms Relational Tables and Views XML Web services Functions A third model type logical provides the ability to define models from a logical or structural perspective How is a Model Defined Models are defined using Telid Designer in various ways Various custom actions Model Classes and Types Telid Designer can be used to model a variety of classes of models Each of these represent a conceptually different classification of models Relational Model data that can be represented in table columns and records form Relational models can represent structures found in relational databases spreadsheets text files or simple Web services XML Model that represents the basic structures of XML documents These can be backed by XML Schemas XML models represent nested structures including recursive hierarchies XML Schema W3C standard for formally defining the structure and constraints of XML documents as well as the datatypes defining permissible values in XML documents Web Services which define Web service interfaces o
81. as your URI value for a procedure http host port war_context model_name books 123 would execute this procedure and pass 123 in as a parameter Here s what the above example would look like in the Extended Properties dialog v M RestfulBooks xmi v Manage Extended Properties b import declarations 4 amp Package Diagram Extended Properties for b amp VirtualBooks RestfulBooks rgetBooks p3 P f b rdeleteBook Property Value b rputBook REST METHOD GET b rupdateBook URI books isbn_in gt M RestfulBooksSchema xsd t Teiid 3 mms localhost 31443 Add Remove RemoveAll Restore conc Note that the generated URI will have the model name included as part of the path so full URL would look like this http host port war_context model_name books 123 If you wanted a REST service to return all books you would write your procedure just as it is above but remove the input parameter The URI property would then just be books or whatever you want and the URL would be http host port war_context model_name books Once you have added all of your procedures along with the required extended properties be sure and add the model to your VDB or synchronize if it s already included in the VDB You will then need to re deploy the VDB po Wa F Important If you redeploy your VDB during development you may receive an Invalid Session Exception due to a stale connection obtaine
82. ata source on Teiid server VDB Execution Enable Preview Enable Preview Teiid Cleanup Teiid Designer Always open editor without prompting Open Designer perspective when a model is opened O Always open Never open Prompt Check and update imports during save Import Logical ER Models as View Relational Models Figure 9 2 General Teiid Designer Preferences Panel 9 1 1 Diagram Preferences Several diagram preferences are available to customize your diagrams Notations Standard diagram notation for Telid Designer is based on UML notation Future releases may include alternate notations Routers The relationship link type for Package and Custom diagrams Foreign Key Primary Key relationships can be customized Available options include Orthogonal default Direct or Manual user defined breakpoints Font Settings Select font type style and size Background Color Settings Select a unique background color for each diagram type to help differentiate between types Model Size Displaying very large diagram may take a considerably long time This preference allows users to set an upper limit on the number of objects to display in a diagram If this limit is exceeded a warning is displayed to the user and the diagram is not constructed Relationship Options UML type relationships can be customized in a couple of ways Role Names and Multiplicity labels can be shown or hidden using the check boxes labeled Show Role Nam
83. ath parameters and or JSON Step 1In a virtual model add a procedure s that returns an XMLLiteral object The target of your procedure can be any models in your VDB Here is an example procedure that selects from a virtual table VirtualBooks and returns the results as an XMLLiteral So amp ev aE 4 Transformation Diagram E Table Editor Transformation Editor amp Cursor at 4 4 BS E a i CREATE VIRTUAL PROCEDURE BEGIN SELECT XMLELEMENT NAME books XMLAGG XMLELEMENT NAME book XMLFOREST RestfulBooks VirtualBooks ISBN RestfulBooks VirtualBooks TITLE RestfulBooks VirtualBooks SUBTITLE RestfulBooks VirtualBooks PUBLISHER RestfulBooks VirtualBooks PUBLISH_YEAR RestfulBooks VirtualBooks EDITION RestfulBooks VirtualBooks TYPE RestfulBooks VirtualBooks AUTHOR_ID AS result FROM RestfulBooks VirtualBooks WHERE RestfulBooks rgetBooks isbn_in RestfulBooks VirtualBooks ISBN END Notice the syntax used to convert the relation table result of the select from VirtualBooks to an XMLLiteral All XML functions are documented in the Scalar Functions chapter of the Telid Reference Guide Here is an example of an update procedure that will insert a row and return an XMLLiteral object 111 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide 4 Transformation Diagram Table Editor Transformation Editor Z 2 amp Cursor at 10 6 BR E Aa m CREATE VIRTUAL PROCEDURE BEGIN
84. ch Menu The Search menu presents several specific search options El Ale Remote a Pointcut Matches co Beans nd sa Teiid Designer gt Figure 10 64 Search Menu Telid Designer contributes a sub menu i e Telid Designer gt to the main search menu as shown above Teiid Designer gt Relationship a es Metadata Transformations And Model Object Figure 10 65 Search Menu The individual actions in the Telid Designer sub menu are described below 189 m in Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Ey Relationship Launches the Search dialog and auto selects the Relationships tab User can search for models in the workspace by specifying a relationship type participant locations 1 Transformations Launches the Transformation Search dialog User can search models in the workspace for matching SQL text Search results appear in the dialog and user can select and view SQL as well as open desired transformations for editing Metadata Launches the Search dialog User can search for models in the workspace by Specifying an Object Type and or a Data Type and or a property value Search results appear in the appropriate editor Find Model Object Launches the Find Model Object dialog which can be used to find an object in the workspace by specifying all or part of its name Selecting the object will open it in the appropriate
85. changing the property Any number of editors can be open at once but only one can be active at a time The main menu bar and toolbar for T eiid Designer may contain operations that are applicable to the active editor and removed when editor becomes inactive Tabs in the editor area indicate the names of models that are currently open for editing An asterisk indicates that an editor has unsaved changes Figure 10 22 Editor Tabs 161 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide By default editors are stacked in the editors area but you can choose to tile them vertically and or horizontally in order to view multiple models simultaneously G PartsSourceA xmi 5 G PartsVirtual xmi 53 fis Package Diagram gt Table Editor is Package Diagram gt Table Editor Description Models Synchronized Visible Source Name Translator JNDI Name Description Gg PartsSourceAxmi PartsProject A TOA PartsSourceA i db2 F PartsSourceA TTT Cea a a ae eee aa G PartsVirtual xmi PartsProject Other Ales VDB Data Roles File Path Synchronized Description Data Role Description Add Figure 10 23 Viewing Multiple Editors The Telid Designer provides main editor views for XMI models and VDBs The Model Editor contains sub editors which provide different views of the data or parts of data within an XMI model These sub editors specif
86. chemas URLs XML schema URLs Into folder BooksProject Options Overwrite existing resources without warning Add Dependent Schema Ales lt Back Cancel Anish Figure 3 61 Add XML Schema URLs Dialog a Step 5 Click the Add XML Schema URL button Enter a valid schema URL Click OK Schema will be validated and resulting entry added to the list of XML Schema URLs XML Schema Url Enter XML schema URL http ns hr xml org 2_4 HR XML 2_4 StandAlone Resume xsd Optional User Name Password Verify Hostname HTTPS Cancel Figure 3 62 Add XSD Schema URLs The schema URL is now displayed in the XML Schema URLs list 76 Chapter 3 Importers Import XML Schema Files Add XML Schemas URLs XML schema URLs http ns hr xml org 2 4 HR XML 2 4 StandAlone Resume xsd Inte folder BooksProject Options Overwrite existing resources without warning Add Dependent Schema Ales ae Figure 3 63 Add XSD Schema URLs Step 6 Click Finish XSD files may have dependent files This importer will determine these dependencies and import these as well if Add Dependent Schema Files is checked 7 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 4 Creating and Editing Model Objects This section Summarizes Teiid Designer features for creating and editing existing model objects contained in your models 4 1 Creating New Model Objects types of metadata
87. ckbox for each model This provides low level data access security by removing specific models and their metadata contents from schema exposed in GUI tools In order for a VDB to be fully queryable the Source Name Translator and JNDI Names must have valid values and represent deployed artifacts on your Teiid server If you have Designer runtime plugins installed and have a Teiid server running you can select a source model in the VDB Editor and right click select Change Translator or Change JNDI Data Source which will allow you to select any applicable artifacts on your server Other Ales M nuataCanaca wei i se ancisiaNamalEatarnsinaN sal mane Model Path 03 Source Name Translator JNDI Name D E DataDictionaryxsd FnancialsDemo EnterpriseDataLayer A A F EU_Customers xmi FinancialsDemo DataSources EU_Customers mysql5 cam EU Customers M EU_Customers_DDC xmi FnancialsDemo EnterpriseDataLayer A A EPEA B Pa a al A A BES ig Products xmi FinancialsDemo DataSources A A Products OPPEN Products_DDC xmi i AnancialsDemo EnterpriseDataLayer Ye A Products_VBL xmi FinancialsDemo VirtualBaseLayer A A ra A Figure 10 52 Change Translato ata Source Actions If you have a default Telid server instance defined and connected the translator and JNDI table cells will contain drop down lists of available translator and JNDI names available on that server 181 Red Hat JBoss Devel
88. class manipulation actions i e Merge Mapping Classes Split Mapping Class etc 10 3 1 1 5 Mapping Transformation Diagram The Mapping Transformation Diagram is identical to a Transformation Diagram except for displaying an Input Set and possibly Staging Tables as sources for the Mapping Class s transformation BooksXML wm 2 Diagram Table Editor Figure 10 41 Mapping Transformation Diagram Example Mapping Transformation Diagram toolbar actions include E9 Refresh Diagram Re draws diagram I Show Parent Diagram Navigates to diagram for parent object if available X Preview Data Executes a simple preview query SELECT FROM a New Mapping Link Create a mapping link between selected mapping extent i e XML element or attribute and mapping class column X3 Remove Mapping Link Delete mapping link between selected mapping extent i e XML element or attribute and mapping class column Ee Add Transformation Sources Add selected sources to transformation iu Add Union Transformation Sources Add selected sources as union sources EJ Remove Transformation Sources Removed sources selected in diagram from transformation t Clear Transformation Remove all sources from transformation ze Open Transformation Reconciler dialog i Save Diagram as Image Save the diagram image to file in JPG or BMP format Modify Diagram Printing Preferences Modify page layout information for printing diagr
89. ctionProfileDescription connectionProfileCategory org eclipse datatools connectivity db category connectionProfileProviderld org eclipse datatools enablement oracle connectionProfile connection url jdbc oracle thin englxdbs11 mm atl2 redhat com 1521 ORCL connectionProfileName PartsOraclell connectionProfilelnstancelD org eclipse datatools enablement oracle connectionProfile driver class oracle jdbc OracleDriver translator name oracle user name partssupplier canes oe Figure 7 1 Connection Profile Information Dialog Note that if a source model has no associated connection profile the following dialog will be displayed 122 Chapter 7 Testing Your Models No Connection info Available No connection info stored in model RelModelA xmi Use Modeling gt Set Connection Profile action to select and apply connection info to model Figure 7 2 No Connection Info Dialog 7 1 3 Remove Connection Profile from Source Model As a user you may not want this connection information i e URL username etc shared through your VDB Designer provides a means to remove this connection information via a Modeling gt Remove Connection Info action When adding a source model without connection information will require the user to Supply or select the correct translator type 7 2 Previewing Data For a Model Designing and working with data is often much easier when you can see the information you re working w
90. cur when the main WSDL file imports other WSDL files that cannot be resolved If no errors select Next to proceed or Finish if enabled to complete with default options Create Web Service from WSDL File Namespace Resolution All namespaces are resolved Select Next to modify the created schemas workspace locations Namespaces dg Namespace http dladb07 fhome sblafond Test Designer Folder example files wsdls OnHand wsdl Figure 3 40 Namespace Resolution Dialog Chapter 3 Importers a Step 5 The next page WSDL Operations Selection allows customizing the resulting content of your Web Service model by selecting deselecting various operations and interfaces in the following dialog Create Relational Model from Web Service WSDL Operations Selection Press the Finish button to finish a Select the desired WSDL Operations _______ Ww ia Share_BSM Real Time Data Design Server _RealTimeData_ portService Select All ad Share_BSM_Real_Time_ Data Design Server_RealTimeData_portPortd T _ Share BSM Real Time Data _Design_Server_RealTimeData_portBinding Deselect All OnHand Selection Details OnHand Operation id http dladbO7 Share_ BSM Real Time Data Design Server _RealTimeData p input message _OnHandInput output message OnHandOutput none Figure 3 41 Namespace Resolution Dialog a Step 6 The next page is tiled Schema Workspace Location Selection This page lists all schemas imported by t
91. d UI behaviors Preferences can be accessed via the Edit gt Preferences action on the Main toolbar Preferences P JBoss lools a ModeShape gt Plug in Development Project Archives gt Remote Systems gt Run Debug gt Server gt Spring gt Team Teiid Designer Diagram Diagram Printing Editor Validation TestNG Validation gt Web gt Web Services gt XML Figure 9 1 Preferences Dialog 9 1 Telid Designer Preferences General Teiid Designer preferences include Always open editor without prompting To change edit a model it must be opened for editing Checking this box will automatically open the model in an editor if the user attempts to performa change in a model If unchecked the user will be informed that an editor will be opened before the operation is completed Open Designer perspective when model is opened If a model is opened via importing projects the New gt Telid Metadata Model menu and the Telid Designer perspective is not open you may want to automatically open the perspective and beging working on your model This preference has 3 settings Always open which means always open the perspective without prompting never open which means do not open the Telid Designer perspective or prompt which will always ask you if you wish to open the Teiid Designer perspective Check and update imports during save occasionally editing a model may add or remove objects in one mode
92. d for the pool This can be corrected by flushing the data source or alternatively you could add a test query to your VDB connection s ds xml file This will insure you get a valid connection after redeploying your VDB The syntax for the test query is as follows lt check valid connection sql gt some arbitrary sql lt check valid connection sqI gt 113 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Step 3 3 If you have not already done so you will need to create a data source for your VDB This can be done in the Teiid View of Designer Right click on your deployed VDB and select Create Data Source The Generate REST WAR dialog will ask you for the JNDI name for your created source so that it can connect to your VDB Step 4 Right click on the VDB containing your virtual model s with REST eligible procedures and select the Modeling gt Generate RESTEasy War action If there are no procedures that are REST eligible the Generate RESTEasy War option will not be enabled S MIYDWL_BOOKS AITI BDOOUKSMESI WEDS New P oksToo xmi a OM _IBooksRESTWebS me Modeling 2 l Deploy E mi Open Execute VDB ee Se My Open With gt Generate JBossWS CXF War i Re J frams Step 5 Fill in missing properties in the REST War Generation Wizard shown below Create REST WAR File Create a REST WAR file to deploy as a REST Web Se
93. d in your model s package diagram Figure 5 3 New Source Function In Package Diagram After saving your model your new source function will be available for use in your transformations If you 101 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide open the Expression builder your source functions will be selectable in the Function drop down selector for a Category named for the model as shown in the example below Expression Builder Initial Expression GETPRODUCTINFO ProductsOracle PRODUCTDATA INSTR_ID ieee SQL View GETPRODUCTINFO ProductsOracle PRODUCTDATA INSTR_ID ProductsOracle PRODUCTDATA INSTR ID O Attribute Constant Function Value is unchanged Function l Argument Name Value PRODUCTID ProductsOracle PRODUCTDATA INSTR_ID Figure 5 4 Source Function In Expression Builder 5 2 Relational View Modeling This section contains descriptions of various features related to creating and managing relational view model objects 5 2 1 Create Materialized Views For any relational view table you can enable it s materialized view option by setting the Materialized property to TRUE and setting the Materialized Table reference as shown in the figure below Note that you are required to have already created your relational tables E Properties 52 Description lt Tags e gt oe Fal P Property Value 0 iten v Misc E Cardinality ir 0 Logical Relationships
94. del WSDL into Relational Source Model WSDL into Web Service Model S XML Schemas gt E XML Figure 3 12 Import from Flat File Source Step 3 Select existing or previous connection profile from the drop down selector or press New button to launch the New Connection Profile dialog See Eclispe Data Tools documentation or Edit to modify change an existing connection profile prior to selection Note that the Flat File Source selection list will be populated with only Flat File connection profiles 43 4 4 Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide Import From Flat File Source Source Selection Press the Next gt button to continue Flat File Source Employeeinfo New Edit Available Data Files Location esignerFolder FlathleData employee data Edit Parser Settings Data Ale Name View Table Name Status O EmpDataRixedWidth tt EmpDataRxedWidthview f No walid header found EmployeeData tet EmployeeDataview PlayerData tet PlayerDataView D No walid header found lt Back Next gt Cancel Figure 3 13 Flat File Source Selection Page Step 3a After selecting a Connection Profile the file contents of the folder defined in the connection profile will be displayed in the Available Data Files panel Check each data file you wish to process Each file will be used to construct a view table containing the required SQL transformation for
95. del to bring it up to date 4 with the source metadata Uncheck any changes you do not wish to apply Only In Old Model 010 o Changes 4 o Only In New Model NEw o 7 file home blafond Runtime Workspaces test 7 1 0 _E DDLTest Products SQLS gt E ProductData b E ProductSymbols Selection Details Figure 3 4 Review DDL Updates Dialog 3 2 Import From JDBC Database You can create relational source models from your JDBC source schema data using the steps below Depending the detail provided in the database connection url information and schema Steps 5 through 7 may not be required a Step 1 In Model Explorer choose the File gt Import action tu in the toolbar or select a project folder or model in the tree and choose Import e Step 2 Select the import option Metadata Modeling gt JDBC Database gt gt Source Model and click Next gt 38 Chapter 3 Importers Select Import metadata using JDBC from a database into a new or existing relational model Select an import source type filter text gt Teid Designer M DDL into Relational Model Er Flat Ale Source gt gt Source and View Model E Metadata from JDBC Database af Metadata from Text Ales on file system r Salesforce as Relational Source Model eff WSDL into Relational Source Model pf WSDL into Web Service Model S XML Schemas gt GS XML Bac k Cancel Figure 3 5 Import from JDBC Database e Step 3 Select
96. del would describe each comma separated value 1 3 6 2 Modeling Your View Metadata When you create View Metadata you are not describing the nature of your physical data storage Instead you describe the way your enterprise uses the information in its day to day operations View Metadata derives its classes and attributes from other metadata You can derive View Metadata from Source Metadata that describes the ultimate sources for the metadata or even from other View Metadata However when you model View Metadata you create special views on your existing enterprise information systems that you can tailor to your business use or application expectations This View Metadata offers many benefits You can expose only the information relevant to an application The application uses this View Metadata to resolve its queries to the ultimate physical data storage You can add content to existing applications that require different views of the data by adding the Chapter 1 Introduction View Metadata to the existing View Metadata that application uses You save time and effort since you do not have to create new models nor modify your existing applications Your applications do not need to refer to specific physical enterprise information systems offering flexibility and interchangeability As you change sources for information you do not have to change your end applications The View Metadata models document the various ways your enterp
97. delimiter again you do not need to save the file Print Ctrl P Prints the contents of the active editor In the Telid Designer this action prints the diagram in the selected editor Allows control over orientation portrait or landscape scaling margins and page order User can also specify a subset of the pages to print i e 2 through 8 Switch Workspace Opens the Workspace Launcher from which you can switch toa different workspace This restarts the Workbench Restart Exits and restarts the Workbench Import Launches the Import Wizard which provides several ways to construct or import models EG Export Launches the Export Wizard which provides options for exporting model data Properties Alt Enter Opens the Properties dialog for the currently selected resource These will include path to the resource on the file system date of last modification and its writable Chapter 10 Teiid Designer Ui Reference or executable state Most Recent Files List Contains a list of the most recently accessed files in the Workbench You can open any of these files from the File menu by simply selecting the file name Exit Closes and exits the Workbench 10 4 2 Edit Menu The Edit menu provides actions to manage the content structure and properties of your model and project resources The figure below represents the Edit menu presented when a metadata model is selected New Child gt New Sibling gt
98. dio 4 1 Teiid Designer User Guide display the Salesforce Objects selection page Create Relational Model from SalesForce Data Model Select the SalesForce objects to Model Press the Next gt button to continue SalesForce Objects Column Details Visible Name Name in Source Type Searchable Updatable Account Partner Account ID i Id id True False Account Share Deleted IsDeleted boolean True False Activity History Master Record IE MasterRecordid reference True False Additional Directo Account Name Name string True True Apex Class Account Type Type picklist True True Apex Trigger Parent Account Parentid reference True True Approval Billing Street BillingStreet textarea True True Approval Request Billing City BillingCity string True True Asset Billing State Pro BillingState string True True Assignment Rule Billing Zip Posta BillingPostalCod string True True Attachment Billing Country BillingCountry string True True Business Hours Shipping Street ShippingStreet textarea True True E T gt ee TTT Select All Deselect All lt Back Next gt Cancel Finish Figure 3 21 Select Salesforce Objects Dialog e Step 5 On the Target Model Selection page specify the target folder location for your generated model a unique model name and select desired import options Press Next gt or Finish
99. ditor which is aware of XML Schema formatting rules 10 3 1 6 Model Object Editors The Model Object Editors represent specialized sub editors which are available for specific model object types For details select a specific editor listed below e Section 4 2 1 Transformation Editor 10 3 2 VDB Editor A VDB or virtual database is a container for components used to integrate data from multiple data 180 Chapter 10 Teiid Designer Ui Reference sources so that they can be accessed in a federated manner through a single uniform API A VDB contains models which define the structural characteristics of data sources views and Web services The VDB Editor provides the means to manage the contents of the VDB as well as its deployable validation state The VDB Editor shown below contains a upper and lower panels The upper panel contains the Models tab and an Other Files tab The lower panel contains tabs for managing Data Roles the VDB Description and Translator Overrides Other Files Model Path 03 8 Source Name Translator JNDI Name Description jg Products xmi UpdateVGTest A A Products oracle Products A Updates xmi UpdateVGTest A A lt G VDB Description Translator Overrides Data Role Description CustomerService Figure 10 51 VDB Editor You can manage your VDB contents by using the Add or Remove models via the buttons at the right Set individual model visibility via the Visibility che
100. dure getbookCollection Edit variables IN_author string IN_edition string IN_isbn string IN_publishDate string Procedure The body of the selected operation s procedure i e it is not necessary to include the CREATE or BEGIN END clauses CREATE VIRTUAL PROCEDURE BEGIN DECLARE string VARIABLES IN_isbn xpathvalue BOOKCOLLECTION_WS BOOKCOLLECTION GETBOOKCOLLECTION bookCollectioninpu t bookCollection book isbn DECLARE string VARIABLES IN_title xpathvalue BOOKCOLLECTION_WS BOOKCOLLECTION GETBOOKCOLLECTION bookCollectioninpu t bookCollection book title DECLARE string VARIABLES IN_subtitle xpathvalue fis Package Diagram F Table Editor 7 Operation Editor Figure 4 29 Operation Editor The Operations section contains all interfaces and operations currently defined in the model Selecting an operation will display the variables related to the input parameter s content in the Input Variables section and the body of its procedure minus the CREATE VIRTUAL PROCEDURE BEGIN END keywords and the input variable declarations and assignments in the Procedure section When pasting in SQL do not include the CREATE VIRTUAL PROCEDURE BEGIN END keywords Input variables will be automatically generated when the Content via Element property is set on an operation s input parameter Input variables may be edited using the Edit link in the Input Variables section and may only represent XPath values
101. e Shifts to the Welcome perspective which contains links to documentation examples and how to starting points Help Contents Launches the Help Window All of Designer s online documentation is accessible from there as well Search 7 Launches the Help Search view which can be used to search for phrases in the documentation Dynamic Help Opens the docked dynamic help view Key Assist Ctrl Shift L Launches a dialog describing existing key assist bindings Tips and Tricks Launches a dialog to select one of any contributed Tips and Tricks help pages Cheat Sheets Launches a dialog to select one of any contributed Eclipse cheat sheets Project Examples A JBoss contributed action which provides quick access to import various project examples into your workspace Report Problem A JBoss contributed action which provides simple problem reporting Check for Updates provides access to retrieve updates to installed Eclipse software Install New Software provides access to install new software into your workbench About XXXXX Launches the About dialog S5 Rad Hat JRoacc Neveloner Stidio 4 1 T ell y De ciqnner llear Gil na CU Fiat JDUSO JCVTIVUVUGS WJ L UU U amp d G IU JTS yg IICI UST LIUTIUE Revision History Revision 4 1 2 1 406 Tue Jan 7 2014 Rudiger Landmann Rebuild with Publican 4 0 0 Revision 4 1 2 1 Thu Aug 29 2013 Michelle Murray TOOLSDOC 387 Rebuilt fo
102. e 10 25 Problems View Context Menu Go To will open the appropriate editor and select the affected referenced object Show In Navigator Opens the Basic gt Navigator view if not open and expands file system tree and reveals applicable resource Copy Copies the problem information to the system clipboard Paste Pastes the problem information located in the system clipboard if applicable into the curor location for a specified text editor Delete Deletes the selected problem rows if applicable Select All selects all problems in the table Quick Fix Not yet implemented in Telid Designer Properties displays a dialog containing additional information 10 2 8 Search Results View Below is an example set of search results The view contains rows representing matches for your search parameters You can double click a entry and the object will be opened and selected in an editor and or the Model Explorer if applicable gt Cs Found 1 match PartsProject SampleViews xmi v Found 7 matches PartsProject PartsVirtual xmi EX PART_NAME PART_NAME http www metamatrix com metamodels Relational Column El PART_COLOR PART_COLOR http www metamatrix com metamodels Relational Column EX PART_ID PART_ID http www metamatrix com metamodels Relational Column EY PART_ID PART_ID http www metamatrix com metamodels Relational Column El PART_WEIGHT PART_WEIGHT http www metamatrix com me
103. e filter text w Teiid Designer M DDL into Relational Model ta Flat Ale Source gt gt Source and View Model D Metadata from JDBC Database Metadata from Text Ales on file system MO Salesforce as Relational Source Model WSDL into Relational Source Model a WSDL into Web Service Model XML Schemas gt XML Cancel Finish Figure 3 52 Import WSDL File Into Web Service Model e Step 3 Input a valid name for your Web Service model and select the URL button Enter a valid WSDL URL in the dialog click OK gt Click Next gt to continue 69 70 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide WSDL Url Enter WSDL Url http terraservice net terraservice2 asmx wsdll Figure 3 53 WSDL URL Dialog s If no WSDL is selected or specified then the importer will only create an empty Web Service model No XML Schema or XML View models will be generated s Any referenced files WSDLs or schemas must either be embedded in the WSDL file or exist on your file system a Step 4 The next page is titted Namespace Resolution This page identifies successful and errant WSDL namespace resolution The main WSDL document will essentially always be resolved since the workspace file chooser is used to obtain the path Problems will occur when the main WSDL file imports other WSDL files that cannot be resolved If no errors select Next to proceed or Finish if enabled to complete with default options
104. e the Input Set Parameters within a mapping class transformation to produce mapping attributes you can map to your XML document 4 2 3 Choice Editor XML Within an XML Document model a choice compositor defines all possible document data structures sometimes called fragments that can appear at that location in an XML instance document When the Teiid Designer Server populates an XML instance document at runtime based upon your virtual XML document it will choose the first fragment that matches the criteria you specify within the Choice Editor To view the choice editor right click on the choice node in the mapping diagram s XML Document tree view and select Edit from the right click pop up menu 93 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Bf eee oo ie title t 48 subtitle Figure 4 24 Opening The Choice Editor Choice Editor bookSetMixed choice Default 3 audioBook tal A x __ Option ame Include Criteria 1 Q hardco HE AudioBooks bookSetMixedDocument MappingClasses bookSetMixed TYPE Hardback 2 softcoverBook SA UCASEfAudioBooks bookSetMixedDocument MappingClasses bookSetMixed TYPE LI 3 e audioBook iv AudioBooks bookSetMixedDocument MappingClasses bookSetMixed TYPE IN Books Figure 4 25 The Choice Editor The table on this panel displays fragment options for the choice each represented by the top node of the document fragment The Su
105. ect Import Type Relational Tables Step 4 In the next page you ll need to provide a source text file containing the metadata formatted to the specifications on the previous page Import Metadata From Text File Select Source Text File and Target Relational Model Select CSV Ale to Import and Destination Model or model folder Select Source Text File Browse Target Location Customerinfo xmi Browse Ale Contents Options Use default datatype string 255 Figure 3 28 Select Source Text File and Target Relational Model Step 5 Select an existing relational model as the target location for your new relational components using the Browse button to open the Relational Model Selector Dialog Select a relational model from your workspace or specify a unique name to create a new model Step 6 Select any additional options and choose Finish 04 Chapter 3 Importers 3 5 2 Import Relational View Table Metadata From Text File To create relational virtual tables from imported text file metadata Perform Steps 1 through 3 above and select the Relational Virtual Tables import type then click Next gt Import Metadata From Text File Select Import Type Select the type of text file import desired 4 Import Type Relational Virtual Tables Y Purpose Imports virtual relational tables and procedures from a CSV text file into a relational virtual model Table data is expected to be of the f
106. ective Hs Undeploy VDB Removes the selected VDB from the Telid instance oe Create Data Source Launches the New Data Source wizard X Delete Data Source Removes the selected Data Source from the Teiid instance If you chose the Use a custom label option the text entry field will enable as shown below New Teiid Instance Enter Teiid Instance Information Define the Teiid Instance connection information Host localhost Label O Use host URL as label Use a custom label development server Figure 10 15 Use a Custom Label Option 10 2 4 Properties View The Properties View provides editing capabilities for the currently selected object in T elid Designer The selection provided by whichever view or editor is currently in focus will determine the its contents To edit a property click a cell in the Value column As in the Table Editor each cell provides a UI editor specific to the property type bs Property Value Object URI Searchability I SEARCHABLE Selectable ic true Updateable Ir true lt w Misc ma Yoo Description Distinct Value Count 7 la 1 Name TA SUPPLIER_NAME Name In Source EA SUPPLIER_NAME Null Value Count laa 1 v Type Datatype string Path http www w3 org 2001 4MLSc Native Type varchar Nullable E NULLABLE Figure 10 16 Properties View 158 Chapter 10 Teiid Designer Ui Reference If the model for the object being edited is not
107. ective from the Window gt Open Perspective menu TO open a perspective by using the shortcut bar button a Step 1 Click on the Open Perspective button E Step 2 A menu appears showing the same choices as shown on the Window gt Open Perspective menu Choose Other from the menu EC Debug 1 hay Java Browsing Other 149 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Figure 10 2 Perspectives Menu Step 3 In the Select Perspective dialog choose Telid Designer and click OK Open Perspective Tg Java Browsing g Java EE fed Java Type Hierarchy a JavaScript 2 JBoss AS A jBPM jPDL 3 af Plug in Development ER Remote System Explorer ES Resource Seam default eo Team Synchronizing ae Teiid Designer Web gi Web Development x XML Figure 10 3 Select Perspective Dialog The Telid Designer perspective is now displayed There are few additional features of perspectives to take note of The title of the window will indicate which perspective is in use T Tetid Designer PartsProject PartsSourceA xmi JBoss Developer Studio Ale Edit Refactor Navigate Search Project Metadata Run Window Help Figure 10 4 Workbench Window Title Bar The shortcut bar may contain multiple perspectives The perspective button which is pressed in indicates that it is the current perspective To display the full name of the perspectives right click the perspective bar and select Show Te
108. ed from row based results into XML formatted text lv fe bookCollection Vv 4 sequence MC book v je book isbn v 4 sequence e title e subtitle fe edition v authors v sequence MC author e author v 4 publishinginformation A E A A A A vV 4 sequence e publisher ie publishDate He Mapping Diagram F Table Editor Figure 10 40 Mapping Diagram Example Mapping Diagram toolbar actions include 174 E9 Refresh Diagram Re draws diagram Show Parent Diagram Navigates to diagram for parent object if available 8 Show Mapping Transformation Diagram Show detailed mapping transformation diagram for selected mapping class X Preview Data Executes a simple preview query SELECT FROM F Generate Mapping Classes Generate mapping classes for the selected XML document root element H New Mapping Class Insert new mapping class referenced to the selected XML document element or attribute El New Staging Table Insert new staging table referenced to the selected XML document element or attribute al Merge Mapping Classes Merge selected mapping classes ENE Split Mapping Class Split selected mapping class f Display All Mapping Classes Chapter 10 Teiid Designer Ui Reference E Show Mapping Class Columns P Filter Displayed Mapping Classes with Selection Context menus for Mapping Diagrams provide Edit capability to the mapping class in addition to mapping
109. editor 10 4 6 Project Menu Close Project Build Working Set gt Clean z Build Automatically Clone Project Ai Build Project Imports Build All Imports i Properties Figure 10 66 Project Menu The individual actions in the Project menu are described below Open Project Launches the Open Project dialog Close Project Closes the currently selected project s a Build All Validates the contents of the entire workspace Any errors or warnings will appear in the Problems View Build Project Validates the contents of the selected project s Any errors or warnings will appear in the Problems View Build Working Set Validates the contents of the selected working set Any errors or warnings will appear in the Problems View Clean Launches the Clean dialog Build Automatically Sets the Build Automatically flag on or off When on a check mark appears to the left of this menu item When this is turned on validation of changes is done automatically each time a Save is done U gt A A bS wie eke Chapter 10 Teiid Designer Ui Reference Clone Project Launches the Clone Project dialog Build Project Imports Reconciles all model import dependencies for models contained within the selected project Build All Imports Reconciles all model import dependencies for models contained within the workspace Build Packages TBD Validate Model Transformations Reval
110. edure and extracts the results from the response 3 Import WSDL Into Web Service You can create a Web Service model by selecting a WSDL file in your workspace importing WSDL files from the file system or by defining a URL The Teiid Designer will interpret the WSDL locate any associated or dependent XML Schema files generate an XML View of the schema components and create a Web Service model representing the interfaces and operations defined in the WSDL There are three options for selecting the WSDL for your Web Service generation Workspace Location File System Location URL Detailed steps for each of these options is described below as well as a description of how the wizard handles WSDL errors 3 7 1 Import WSDL From Workspace Location You can create a Web Service model by selecting a WSDL file from your workspace Step 1 Choose the File Import choose the File gt Import action tu in the toolbar or select a project folder or model in the tree and choose Import Step 2 Select the import option Teiid Designer gt WSDL File or URL gt gt Web Service Model option shown below and click Next gt 60 Select Create Web Service Model from WSDL file from file system Select an import source type filter text gt Teid Designer D DDL into Relational Model Er Flat Ale Source gt gt Source and View Model D Metadata from JDBC Database ate Metadata from Text Ales on file system NM Salesforce as Relatio
111. eed or Finish if enabled to complete with default options 66 Chapter 3 Importers Create Web Service from WSDL File Namespace Resolution All namespaces are resolved Select Next to modify the created schemas workspace locations Namespaces de Namespace Fath CLLLLLLLLLFLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL lt Back Next gt Cancel Figure 3 47 Namespace Resolution Dialog Step 5 The next page WSDL Operations Selection allows customizing the resulting content of your Web Service model by selecting deselecting various operations and interfaces in the following dialog Create Relational Model from Web Service WSDL Operations Selection Press the Anish button to finish Select the desired WSDL Operations wv ia Share_BSM Real Time Data Design Server _RealTimeData_portService 7 Share_BSM_Real_Time_Data Design Server_RealTimeData_portPortd v _ Share_BSM Real Time Data Design Server RealTimeData_portBinding Deselect All OnHand Select All C gt Selection Details OnHand Operation id http Xdladb07 Share_BSM_Real_Time_Data_Design_Server_RealTimeData_p input message _OnHandinput output message OnHandOutput ault
112. el Create Web Service View Model To create a new empty web service view model Step 2 Specify a unique model name Step 3 Select Web Service option from Model Class drop down menu Step 4 Select View Model from Model Type drop down menu Step 5 Click Finish You can change the target location i e project or folder by selecting the Browse button and selecting a project or folder within your workspace In addition to creating a new empty web service view model the following builder options are available Copy from existing model of the same model class 30 Chapter 2 New Model Wizards Build from existing WSDL file s or URL 2 5 1 Copy From Existing Model This builder option performs a structural copy of the contents of an existing model to a newly defined model You can choose a full copy or select individual model components for copy To create a new relational model by copying contents from another web service view model complete Step 5 Select the model builder labeled Copy from existing model of the same model class and click Next gt The Copy Existing Model dialog will be displayed Step 6 Select an existing relational model from the workspace using the browse button Step 7 Check the Copy all descriptions option if desired Click Finish ae New Model Wizard Copy an Existing Model Select an existing model to be copied Existing Model USCustomers xmi Model Contents gt E
113. el bookCollection WS su Interface Name bookCollection Operation Name getbookCollection Operation Definition Input Message Element e bookCollection BooksNS BookSetNested m Input Message Mame bookCollectioninput Output Message Element bookCollection BooksNS BookSetNested Output Message Name bookCollectionOuput Cancel Figure 2 13 Generate A Web Service Dialog Step 4 Click Finish to generate model When model generation is complete a confirmation dialog should appear Click OK Generation Completed Figure 2 14 Generation Completed Dialog 32 Chapter 2 New Model Wizards Users can change the Web Service Model and Interface Name values via buttons to use existing Web service model components This will create a new operation in an existing model 2 6 Creating New Extensions Model Create New Extensions Model To create a new empty extensions model a Step 2 Specify a unique model name a Step 3 Select Model Extensions option from Model Class drop down menu 5 Step 4 Select Model Class Extension from Model Type drop down menu Step 5 Click Finish You can change the target location i e project or folder by selecting the Browse button and selecting a project or folder within your workspace In addition to creating a new empty extensions model the following builder option is available a Copy from existing model
114. el Editor by double clicking the model in 5 Step 3 Select File gt Save As action to open the Save Model As dialog Save Model As Figure 6 5 Select Editor Tab Select a destination for the copy AllCustomerAccounts gt Ea Northwind xmi Sources gt BooksProject gt PartsProject gt t wspLimportProject Enter the new model name Ready to copy Figure 6 6 Save Model As Dialog a Step 4 Enter a unique model name in the new model name text field and click OK 5 Step 5 If dependent models are detected the Save Model As Import References dialog is presented to give you the opportunity to change any of the dependent models imports to reference the new model or not 118 Chapter 6 Editing Models and Projects Save Model As Import References The following model files use or reference the model to be copied Select any that should be modified to use the new copy Se AllCustomerAccounts CustomerViews xmi Select All Deselect All Figure 6 7 Save Model As Dialog 6 4 Clone Project Because each instance of of a model contains a unique ID and each object in each model contains a unique ID copying a project is a delicate task For this reason the Clone Project action was created to manage the creation of exact structural copies of all models in the source project The following lists specific rules and limitations for this action This action clo
115. elect the VDB in the Telid View and right click select the Execute VDB action there This will create a Telid Connection Profile specific for that VDB open the Database Development perspective and create a connection to your VDB Continue with Step s 2 and 3 above Note that if you do not have a Teiid instance defined or your default Telid instance is disconnected the following dialog will be displayed if the Modeling gt Deploy action is launched B No Teiid Instance w There is no connected default Teiid instance awailable Figure 7 13 No Teiid Instance Defined 129 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide 7 3 4 Executing a Deployed VDB To execute a VDB that s been deployed manually follow the steps below To execute a VDB that s been deployed manually follow the steps below Step 1 Open the Database Development perspective Step 2 Select the Database Connections folder and choose the New action to display the New Connection Profile dialog New Connection Profile Connection Profile Create a Teiid connection profile Connection Profile Types type filter text A Ej MaxDB a Ea ModeShape E MySQL E Oracle Ej PostgreSQL Ej SQL Server E SOLite Ea Sybase ASA Ed Sybase ASE Teiid Name Description optional Figure 7 14 New Connection Profile Dialog a Step 3 Enter unique name for your profile select an existing connection profi
116. enu 188 10 4 4 Navigate Menu 188 10 4 5 Search Menu 189 10 4 6 Project Menu 190 10 4 7 Metadata Menu 191 10 4 8 Run Menu 191 10 4 9 Window Menu 191 10 4 10 Help Menu 192 REVISIONIGISIOIY sorire eke eee eae es eee nape nae e ne arn aes 194 Table of Contents Dar H nf Rance fypavalnnar Ct J Ain A 1 T aid D acinnar Illcecar Q ida Ked mat JBOSS Veveloper otudio 4 1 Iena Designer User GUIGE L Preface 1 Document Conventions This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information Liberation Fonts set is also used in HT ML editions if the set is installed on your system If not alternative but equivalent typefaces are displayed Note Red Hat Enterprise Linux 5 and later include the Liberation Fonts set by default 1 1 Typographic Conventions Four typographic conventions are used to call attention to specific words and phrases These conventions and the circumstances they apply to are as follows Mono spaced Bold Used to highlight system input including shell commands file names and paths Also used to highlight keys and key combinations For example To see the contents of the file my_next_bestselling novel in your current working directory enter the cat my_next_bestselling_novel command at the shell prompt and press Enter to execute the command The above includes a file name a shell command and a key all presented in mono spaced b
117. ep 4 Select View Model from Model Type drop down menu Step 5 Click Finish You can change the target location i e project or folder by selecting the Browse button and selecting a project or folder within your workspace In addition to creating a new empty relational view model the following builder options are available Copy from existing model of the same model class Transform from existing model 2 2 1 Copy From Existing Model This builder option performs a structural copy of the contents of an existing model to a newly defined model You can choose a full copy or select individual model components for copy To create a new relational model by copying contents from another relational view model complete Step 5 Select the model builder labeled Copy from existing model of the same model class and click Next gt The Copy Existing Model dialog will be displayed 24 Chapter 2 New Model Wizards Step 6 Select an existing relational model from the workspace using the browse button Step 7 Check the Copy all descriptions option if desired Click Finish wed New Model Wizard Copy an Existing Model Select an existing model to be copied Existing Model USCustomers xmi Model Contents gt E ACCOUNT gt HB ACCOUNTHOLDINGS gt E CUSTOMER p J Data Source Copy all descriptions Cancel Anish Figure 2 5 Copy An Existing Model Dialog 2 2 2 Transform From Existing M
118. erate the Web service model Generate virtual XML document model Location WSDLimportProject XML Model OnHandWSRes ponses Cancel Finish Figure 3 50 Namespace Resolution Dialog In order to successfully generate Web Services from WSDL the WSDL must be error free WSDL validation is performed during Step 3 above If errors do exist a error summary dialog will be displayed shown below and you will not be able to Finish the wizard until the WSDL problems are fixed or you re import and select a valid WSDL file 68 Create Web Service from WSDL File Validation Problems One or more selected WSDL files have errors Please correct or remove the file s to proceed WSDL Validation Panel a message wsdl file X cvc elt 1 Cannot find the declaration of element wsdl definitions http terraservice net terraservice2 asmx wsdl Figure 3 51 WSDL Validation Problems Dialog 3 3 Import WSDL From URL You can create a Web Service model by selecting a WSDL file based on a URL Chapter 3 Importers s Step 1 Choose the File Import choose the File gt Import action u in the toolbar or select a project folder or model in the tree and choose Import e Step 2 Select the import option Telid Designer gt WSDL File or URL gt gt Web Service Model and click Next gt Select Create Web Service Model from WSDL file from file system Select an import source typ
119. es and Show Multiplicity Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide Diagram ow v General settings for Diagrams Notations Default Notation UML ai Routers Default Router Style Orthogonal fe Font Settings Font Type Sans Regular 8 View Change PEY Color Settings Dependency Diagram Custom Diagram a Mapping Diagram Relationship Diagram a Transformation Diagram Custom Relationship Diagram m Fackage Diagram Model 2 e HJ4 AAA T Warn If Model Size is Larger Than 200000 Relationship Options Show Role Names Show Multiplicity Restore Defaults Apply Figure 9 3 Diagram Preferences Panel 9 1 2 Diagram Printing Preferences Diagram print options are stored as preferences These can be accessed through this preference page by right click on diagram Page Setup action Or via the Modify Diagram Printing Preferences action located on the vertical diagram toolbar 142 Diagram Printing Diagram Print Orientation O Portrait Landscape Scaling Atto One page O Atto One page high as many as necessary wide O Atto One page wide as many as necessary high Adjust to 100 normal size Margins Top 0 0 is Left 0 0 iS Bottom 0 0 i Page Order Over then down O Down then over Chapter 9 User Preferences Right 0 0 Re store Defaults Apply Figure 9 4 Diagram Preferences Panel 9 1 3 Edi
120. es will be fully quailified Import SQL Text allows you to import a sql statement from a text file on your file system Pressing this button will display an import dialog in which you can navigate to the file A Export SQL Text allows you to export the currently displayed SQL statement into a text file on your file system Pressing this button will display an export dialog in which you can choose the location for export Close X closes the transformation editor 4 2 1 1 Using the Criteria Builder The Transformation Editor s Criteria Builder offers you a quick graphical means to build criteria clauses in your transformations based on meta objects in your diagram If you launch the Criteria Builder with your cursor within an existing criteria in your transformation SQL the builder will open in Edit mode If your cursor is not in an existing criteria location the builder will open in create mode and allow you to create it from scratch This procedure provides an example of building a criteria clause using the Criteria Builder When building your own criteria you can mix and match the values and constants with whatever logic you need to build powerful and complex criteria To use the Criteria Builder Step 1 In the Transformation Editor click the Launch Criteria Builder button Step 2 The Criteria Builder displays Fos ye Initial Expression Chapter 4 Creating and Editing Model Objects Criteria Builder Part
121. esign Time Metadata 1 3 5 2 Runtime Metadata 1 3 6 Source and View Metadata 1 3 6 1 Modeling Your Source Metadata 1 3 6 2 Modeling Your View Metadata 1 3 6 3 Modeling Metadata Transformations 1 3 6 3 1 Metadata Transformations 1 3 6 3 2 SQL in Transformations 1 3 6 3 3 Mapping XML Transformations 1 4 It s all in the Modeling 2 1 1 Generate File Translator Procedures 2 1 2 Generate Web Service Translator Procedures 2 1 3 Copy From Existing Model 2 2 Creating New Relational View Model 2 2 1 Copy From Existing Model 2 2 2 Transform From Existing Model 2 2 3 Create From XML Schema 2 3 Creating XML Document View Model 2 3 1 Copy From Existing Model 2 3 2 Build XML Documents From XML Schema 2 4 Creating XML Schema Model 2 4 1 Copy From Existing Model 2 5 Creating Web Service View Model 2 5 1 Copy From Existing Model 2 5 2 Build From Existing WSDL File s or URL 2 5 3 Build From Relational Models 2 5 4 Build From XML Document View Models 2 6 Creating New Extensions Model 2 6 1 Copy From Existing Model COON DOD O 10 10 11 11 11 12 12 12 13 13 13 13 14 14 14 15 15 16 16 17 21 21 22 23 24 24 25 25 26 2 2 29 29 30 31 31 31 31 33 33 3 1 Import DDL 3 2 Import From JDBC Database 3 3 Import From Flat File Source 3 4 Import From Salesforce 3 5 Import Metadata From T ext File 3 5 1 Import Relational Table Metadata From Text File 3 5 2 Import
122. esigner User Guide Base Tables ry Columns F Foreign ation Mame Me CATEGORIES ft CUSTOMERCUSTOMERDEMO CL LUSTOMERDEMOGRAPHICS Cl CUSTOMERS tt EMPLOYEES Ef Figure 10 44 Editing String Property If a property is of a boolean true or false type or has multiple selectable values a combo box will be displayed to change the value Supports U true true true true true true true ke Figure 10 45 Editing Boolean Value i Searchability Current ALL_EXCEP false ALL_EXCEP false ALL_EXCEP false ARCHABLE _ False SEARCHABLE ALL EXCEPT LIKE ia LIKE ONLY UNSEARCAAGLE SEARCHABLE false SEARCHABLE false Figure 10 46 Editing Multi Value Property For multi valued properties where the available values are dynamic i e can change based on available models or data a picker button will be displayed Datatype ink xsslong short stink long xstinkeger string Path http wana oroza long xssinkeger string string long xssinkeger Figure 10 47 Editing Multi Value With Picker An example of of this type is the relational column datatype property Editing via the table cell and clicking 178 Chapter 10 Teiid Designer Ui Reference the button for datatype will display the following dialog Datatype int xsslong short stink long xstinkeger string Path http wana oroza long xssinkeger string
123. espace Resolution Dialog Chapter 3 Importers In order to successfully generate Web Services from WSDL the WSDL must be error free WSDL validation is performed during Step 3 above If errors do exist a error Summary dialog will be displayed shown below and you will not be able to Finish the wizard until the WSDL problems are fixed or you re import and select a valid WSDL file Create Web Service from WSDL File Validation Problems One or more selected WSDL files have errors Please correct or remove the file s to proceed WSDL Validation Panel a message wsdl file X eve elt 1 Cannot find the declaration of element wsdl definitions http terraservice net terraservice2 asmx wsdl ene J nerz cone C e Figure 3 58 WSDL Validation Problems Dialog ITI 3 8 XSD Schema File You can import XML Schema file XSD files using the steps below a Step 1 In Model Explorer choose the File gt Import action tu in the toolbar or select a project folder or model in the tree and choose Import 73 74 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Step 2 Select the import option Metadata Modeling gt XSD Schemas and click Next gt Select Import XML Schemas from file system or via URL Select an import source w gt Teiid Designer DDL into Relational Model ta Flat Ale Source gt gt Source and View Model Metadata from JDBC Database Metadata f
124. ew gt Customize Perspective Save Perspective As Reset Perspective Close Perspective Close All Perspectives Navigation gt Preferences Figure 10 69 Window Menu The Preferences action launches the Preferences dialog which can be used to set preferences and default values for many features of Telid Designer Note that these menu items may vary depending on your set of installed Eclipse features and plugins If you wish to customize a perspective to include one or more Telid Designer views select the Show View gt Other action and expand the Teiid Designer category to show the available views Show View gt Team Teiid Designer e Datatypes Description w Metadata Faworites tat Model Explorer aH Relationship Nawigator ae System Catalog w Tags cee Teiid Wh Teiid Model Classes Cancel Figure 10 70 Show View Dialog 10 4 10 Help Menu 192 Chapter 10 Teiid Designer Ui Reference The Help Menu shown below contains no Teiid Designer specific actions See Eclipse Workbench documentation for details Welcome Help Contents coe Search Dynamic Help Key Assist Shitt Ctri l Tips and Tricks Cheat Sheets Project Examples Report Problem Red Hat Web Site Check for Updates Install New Software About JBoss Developer Studio Figure 10 71 Help Menu The individual actions are described below Welcom
125. f the model selected for preview is a source model and there is insufficient connection info for that model the following dialog will be displayed and the action terminated 123 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Preview Not Available Preview not available for model gt gt ProductsSOQLServer xmi Use Modeling gt Set Connection Profile action first then retry Figure 7 3 Preview Not Available If any of the source models in the corresponding project require a password that can t be retrieved from an existing connection profile the user will be queried for each missing password Missing Password Required Preview data requires password for model gt gt Products xmi Referenced connection profile gt gt AllProducts Cancel Figure 7 4 Missing Password Testing Your Transformations When editing transformation SQL in the Transformation Editor a special SQL Results data action is provided in the editor tool bar T You can change your transformation SQL re validate and preview your the data for your modified SQL The following sections provide steps for previewing your data Note that all steps assume that all source models referenced by your models either directly or through dependencies are bound to connector bindings 7 2 1 Preview Relational Table or View To preview a relational table relational view or staging table 7 2 2 Preview Relational Table With Access Pattern
126. gement Connection Profiles provide a mechanism to connect to JDBC and non JDBC sources to access metadata for constructing metadata source models Telid Designer also provides a custom T eiid connection profile template designed as a JDBC source to a deployed VDB By selecting various Telid Designer Import options any applicable Connection Profiles you have defined in your Database Development perspective will be available to use as your import source From these import wizards you can also create new connection profiles or edit existing connection profiles without leaving the wizard VDB artifacts deployed there The Create Data Source action available on this view utilizes the available and applicable connection profiles 7 1 1 Set Connection Profile for Source Model Telid Designer integrates Data Tools Connection Profiles by persisting pertinent connection information in each source model This can occur through Importing process or through the Modeling gt Set Connection Profile action 7 1 2 View Connection Profile for Source Model In addition to setting the connection profile on a source model you can also view a source model s connection profile information via the Modeling gt View Connection Info action which displays the detailed properties of the connection J Model Connection Info x Info The properties in the table below are currently stored in the source model PartsSourceB xmi Properties name value conne
127. generated by the T elid Designer Server This fragment of the document model is called the recursive fragment The mapping transformation for this fragment is no different from the first except that you can access the first cycle s mapping class attributes plus you have the opportunity to specify the conditions that will halt the recursion You can recognize a mapping class located at the second recursive document fragment by the looping arrow button in the top left hand corner of the diagram object as shown below When you model a virtual document based on an XML Schema model containing recursion you can choose whether to treat the nested fragments as recursive You should only use recursion when the data access pattern from your data source s is also recursive in other words when the same query transformation should be executed over and over to generate and map the nested document s data content By default the Teiid Designer does not mark the recursive fragments in document models to execute recursively in the Telid Designer Server To take advantage of this behavior you must open the 4 2 4 1 The Editor The Recursion Editor lets you enable and limit recursion The Recursion Editor button only displays on mapping classes which have recursive patterns For example if you have an element named Employee which contains a element named Supervisor which itself contains an Employee element nested within it you might need to limit the number
128. gner data services are defined quickly the resulting artifacts are easy to maintain and reuse and all the valuable work and related metadata are saved for later reference 10 Chapter 1 Introduction You can use Telid Designer to integrate multiple sources and access them using the common data access standards Web Services SOAP XML JDBC SQL ODBC SQL Telid Designer is an integral part of the Telid Designer enterprise class system for providing data services for service oriented architectures 1 3 Metadata Overview 1 3 1 What is Metadata Metadata is data about data A piece of metadata called a meta object in the Teiid Designer contains information about a specific information structure irrespective of whatever individual data fields that may comprise that structure Let s use the example of a very basic database an address book Within your address book you certainly have a field or column for the ZIP code or postal code number Assuming that the address book services addresses within the United States you can surmise the following about the column or field for the ZIP code Named ZIPCode Numeric A string Nine characters long Located in the StreetAddress table Comprised of two parts The first five digits represent the five ZIP code numbers the final four represent the ZIP Plus Four digits if available or OOOO if not Formatted only in integer numeric characters Errors will result if formatted as
129. gs Bocuments Elements Recursive Elements Complex Subtype Elements Attributes Total entity count lt Back Next Cancel Anish Figure 2 9 Selected Documents Statistics Dialog Chapter 2 New Model Wizards e Step 10 Optional Click Finish to create a model of all selected document entities or click Next gt to view Preview Generated Documents page that allows you to exclude document specific entities then click Finish For deeply nested schema your total entity count may be large If so displaying the preview may take some time New Model Wizard x Preview Generated Documents Preview and edit the documents generated from the XSDs you selected Elements marked with a boxed arrow contain recursive data Elements marked with indicate that the builder stopped at the node M bibliographyDocument z bibliography BooksNS Bibliography gt sequence i BooksNS http www metamatrix com XMLSchema DataSets Books gt xsd http www w3 org 2001 XMLSchema 2 BookTypesNS http www metamatrix com XMLSchema DataSets Books BookDatatypes ema neo cancer anh Figure 2 10 Preview Generated Documents Dialog 2 4 Creating XML Schema Model Create XML Schema Model To create a new empty xml schema xsd model e Step 1 Launch the New Model Wizard s Step 2 Specify a unique model name e Step 3 Select XML Schema XSD option from Model Class drop down
130. guments this function needs You can also nest another function in the tree using the Function editor 91 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Ce Expression Builder Initial Expression lt undefined gt cei SOL View lt CONCAT Books SourceB AUTHORS FIRSTNAME Books SourceB AUTHORS LASTNAME Books SourceB AUTHORS FIRSTNAME Books SourceB AUTHORS LASTNAME eet Expression Editors O Attribute Constant Function Value is unchanged Category STRING Argument Name STRINGI Books SourceB AUTHORS FIRSTNAME STRING Books SourceB AUTHORS LASTNAME Cancel Figure 4 21 Nested Function Example Step 8 Click each sub node in the tree and use the editors at the bottom of the dialog box to apply an attribute constant or function value to it Step 9 When you have added values to all nodes as shown below click OK to add this expression to your query or Cancel to close the dialog box without inserting the expression If the OK button does not enable you have not added a value to all nodes in the tree You can also nest functions within your expressions by selecting an argument and selecting a function for that argument The nested function displays in the tree beneath your root function and its arguments display as well Using the Expression Builder and nested functions you can create complex logic within your query transformations 4 2 2
131. he WSDL along with any dependent schemas referenced within schemas as well as schemas embedded in the WSDL and indicates whether or not they are resolvable All resolved schemas will be created in a separate file and added to the workspace The editor panel allows you to change the default file name of the new schema file s If no errors select Next to proceed or Finish to complete with default option Create Web Service from WSDL File x Schema Workspace Location Selection All workspace schema locations are valid Click Next to continue Schema Location Information fpj Namespace Source Ale http localhost Share_BSM Real_Time_Data Design_Server RealTimeData_port OnHand home blafond Test Designer Fo 4 Editor http localhost Share_BSM_Real_Time_Data Design_Server RealTimeData_port OnHand Folder WSDLimportProject C Name without file extension OnHand D lt Back Next gt Cancel 63 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Figure 3 42 Namespace Resolution Dialog e Step 7 The last page titled XML Model Generation allows you to change the name of the XML View model if the Generate virtual XML document model is checked Input desired name or use the default name provide Select Finish to complete Create Web Service from WSDL File XML Model Generation Ready to generate the Web service model Generate virtual XML document model L
132. he data essential to building our Address Pool You can add other SQL logic to the transformation query to transform the data information For example the address book database uses a nine character string that represents the ZIP Plus Four The transformation could perform any SQL supported logic upon the ZIPCode column to substring this information into the format we want for the Address Pool View metadata model 1 3 6 3 3 Mapping XML Transformations When you model View Metadata you can also create a View XML Document model This View Document lets you select information from within your other data sources just like a regular View Metadata model but you can also map the results to tags within an XML document Address Book Vendor Text Database File Address AML b Figure 1 3 Data Flow for XML Transformations In this example the Address Pool View Metadata model still selects its information from the Address Book Database and the Vendor Text File but it also maps the resulting columns into tags in the Address 16 Chapter 1 Introduction XML document 1 4 It s all in the Modeling What Are Models A model is a representation of a set of information constructs A familiar model is the relational model which defines tables composed of columns and containing records of data Another familiar model is the XML model which defines hierarchical data sets In Teiid Designer models are used to define the entities and
133. he one you just completed you build the expression the same way using the Expression Editors panel and the Predicate Editor panel You can create complex nested criteria by judicious use of the AND and OR buttons Once you have created the complete criteria you want click OK to add it to your transformation 4 2 1 2 Using the Expression Builder The Transformation Editor s Expression Builder offers you a quick graphical means to build expressions in your transformations This Expression Builder lets you create Attributes by selecting an attribute Constants by selecting the datatype and value Functions from both the standard Telid Designer SQL functions and your enterprise s custom user defined functions If you select a function before you launch the Expression Builder you can use the Expression Builder to edit the selected function otherwise you can create a new function from scratch To use the Expression Builder Step 1 In the Transformation Editor click the location where you want to insert the function Step 2 Click the Expression Builder button The SQL Expression Builder displays TE Expression Builder x Initial Expression lt cundefined gt ERE Expression Editors Attribute Constant Function Choose Attribute below to replace selected lt undefined gt z PartsSourceA SUPPLIER_PARTS E PartsSourceA SUPPLIER_PARTS SUPPLIER_ID E PartsSourceA SUPPLIER_PART
134. hysical model containing a single procedure called invoke This model and procedure correspond to the single port declared in the WSDL For a WSDL with multiple wsdl port declarations the importer would create a physical model with an invoke procedure for each wsdl port declaration This facilitates binding each physical model to its own T elid WebService Connector and allowing the connector to supply the endpoint A single view model containing a catalog named after the operation declared in the WSDL For a WSDL with multiple wsdl operation declarations the importer would create multiple catalogs The catalog contains procedure declarations that use the SQLXML calls supported by Teiid to create and parse the XML defined as the operation messages 59 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide gt JBDS1362 v onHand OnHand wsdl WF Ca Share_BSM_Real_Time_Data_Design_Server_RealTimeData_portService xmi gt import declarations 2 fis Package Diagram gt E invoke i Sr Share_BSM_Real_Time_Data_Design_Server_RealTimeData_portServiceXML xmi gt import declarations 2 ta Package Diagram Oo OnHand ta Package Diagram gt A create_webServicelnput gt extract_OnHand_DT Figure 3 36 Importing the WSDL file into the Model Explorer The user can now use the procedures defined by the importer in a higher level view model that builds the request executes the service via the invoke proc
135. ic to model types are listed below Diagram Editor All models except XML Schema models Table Editor All models Simple Datatypes Editor XML Schema models only Semantics Editor XML Schema models only Source Editor XML Schema models only The VDB Editor is a single page editor containing panels for editing description model contents and data roles In addition to general Editors for models there are detailed editors designed for editing specific model object types These object editors include Transformation Editor Manages Transformation SQL for Relational View Base Tables Procedures and XML Web Service Operations Choice Editor Manages properties and criteria for XML choice elements in XML Document View models Input Editor Manages Input Set parameters used between Mapping Classes in XML Document View models Recursion Editor Manages recursion properties for recursive XML Elements in XML Document View models 162 Chapter 10 Teiid Designer Ui Reference Operation Editor Manages SQL and Input Variables for Web Service Operations 10 2 7 Problems View The Problems View displays validation errors warnings or information associated with a resource contained in open projects within your workspace 1 error 1 warning 0 others Description Resource Path Location 6 em a _ gt r srg mr i SQL statement is empty Books xmi BooksProject
136. ical metadata sources or other virtual metadata and how to update the sources The Transformation Editor provides a robust set of tools you can use to create these SQL queries You can use these tools or you can simply type a SQL query into the Transformation Editor To edit a transformation you can Double click Edit A relational view table or procedure in the Model Explorer or Diagram Editor A transformation node in a transformation diagram or mapping transformation diagram A mapping class in a mapping diagram or mapping transformation diagram Right click Edit action on selected object in the Model Explorer Diagram Editor or Table Editor A relational view table or procedure A transformation node in a transformation diagram or mapping transformation diagram A mapping class in a mapping diagram or mapping transformation diagram lf a Model Editor is not currently open for the selected object s model a Model Editor will be opened After the corresponding transformation diagram is opened in the Diagram Editor the Transformation Editor is displayed in the lower section of the Diagram Editor 84 Chapter 4 Creating and Editing Model Objects Transformation Editor sf amp Cursor at 1 1 C Supports Update ER SELECT PartsSourceA SUPPLIER_PARTS SUPPLIER_ID PART_ID QUANTITY SHIPPER_ID SUPPLIER_NAME SUPPLIER_STATUS SUPPLIER_CITY SUPPLIER_STATE FROM PartsSourceA SUPPLIER_PARTS PartsSourceB SUPPLIER WHERE PartsSourceA SUPPLIER_
137. ical while the Table Editor provides spreadsheet like editing capabilities This section describes these various sub editors 10 3 1 1 Diagram Editor The Diagram Editor provides a graphical view of the a set of model components and their relationships Several types of diagrams are available depending on model type They include 1 Package Diagram Custom Diagram Transformation Diagram BE Mapping Diagram Hg Mapping Transformation Diagram You can customize various diagram visual properties via Diagram Preferences Each diagram provides actions via the Main toolbar diagram toolbar and selection based context menus These actions will be discussed below in detail for each diagram type When a Diagram Editor is in focus a set of common diagram actions is added to the application s main toolbar 100 PE A a HE Figure 10 35 Main Toolbar Diagram Actions The actions include Zoomin Zoom to Level Zoom Out A Increase Font Size A Decrease Font Size HE Perform Diagram Layout 10 3 1 1 1 Package Diagram The Package Diagram provides a graphical view of the contents of a model container be it the model itself a relational catalog or schema Chapter 10 Teiid Designer Ui Reference G X c a fis Package Diagram Table Editor Figure 10 36 Package Diagram Example Package Diagram toolbar actions include a amp Refresh Diagram Re draws diagram a Show Parent Diagram Navigates
138. idates all transformations for the selected view model Properties Displays the operating system s file properties dialog for the selected file 10 4 7 Metadata Menu The Metadata menu provides Teiid Designer specific actions dacen Run Window Help ate Show System Catalog fe Show Datatype Hierarchy Figure 10 67 Metadata Menu The Metadata menu contains the following actions Update Model from Source If the selected model is a relational source model that was Originally created via JDBC Import then the model will be updated based on changes in the database schema Re resolve References Analyzes references within models to other model components Convert to Enterprise Datatypes Adds an additional property to simple datatypes within your selected schema model to label them as enterprise datatypes Show Model Statistics Opens the Model Statistics dialog for the selected model Build Model Imports Reconciles all model import dependencies for the selected model 10 4 8 Run Menu Telid Designer currently does not contribute actions to the Run menu See Eclipse documention for details FN External Tools gt Figure 10 68 Window Menu 10 4 9 Window Menu The Window menu shown below contains no Teiid Designer specific actions See Eclipse Workbench LY 1 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide documentation for details New Window New Editor Open Perspective gt Show Vi
139. ilder optional Generate Ale Translator Procedures a Generate Web Service Translator Procedures ag Copy from an existing model of the same model class Cancel Anish Figure 2 1 Import Wizard Selection Dialog 2 1 Creating New Relational Source Model Create New Relational Source Model To create a new empty relational source model Step 2 Specify a unique model name Step 3 Select Relational option from Model Class drop down menu a Step 4 Select Source Model from Model Type drop down menu Step 5 Click Finish K You can change the target location i e project or folder by selecting the Browse button and selecting a project or folder within your workspace In addition to creating a new empty relational source model the following builder options are available a Copy from existing model of the same model class 2 1 1 Generate File Translator Procedures This builder option allows construction of a relational model containing one or more of the procedures 21 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide required for accessing file based data via a file translator Step 5 Select the model builder labeled Generate File Translator Procedures and click Next gt The Generate File Translator Procedures dialog will be displayed Step 6 Check one ore more of the Available File Translator Procedures Click Finish New Model Wizard Generate File Translator
140. in a Model Editor Editing a property value for instance will require an open editor prior to actually changing the property Any number of editors can be open at once but only one can be active at a time The main menu bar and toolbar for T eiid Designer may contain operations that are applicable to the active editor and removed when editor becomes inactive Tabs in the editor area indicate the names of models that are currently open for editing An asterisk indicates that an editor has unsaved changes Ie JartsVirtual xmi ss gt Ga PartsSourceA xmi Parts wdb Figure 10 33 Editor Tabs By default editors are stacked in the editors area but you can choose to tile them vertically and or horizontally in order to view multiple models simultaneously 168 ig PartsSourceA xmi 5 G PartsVirtual xmi 3 7 Chapter 10 Teiid Designer Ui Reference fs Package Diagram 7 Table Editor fis Package Diagram F Table Editor A Fy A A A A A Description Models Synchronized Visible Source Name Translator JNDI Name Description Ga PartsSourceB xmi i PartsProject PartsSourceB sqlserver PartsSourceB PartsVirtual xmi PartsProject Other Files VDB Data Roles File Figure 10 34 Viewing Multiple Editors Synchronized Description Data Role Description The Teiid Designer provides main editor views for XMI models and VDBs The
141. iners and even models E G PartsOracle1l xmi G we El So wo A ee oe ms Custom Diagram E Table Editor 172 Chapter 10 Teiid Designer Ui Reference Figure 10 38 Package Diagram Example Custom Diagram toolbar actions include E9 Refresh Diagram Re draws diagram J Show Parent Diagram Navigates to diagram for parent object if available WY Preview Data Executes a Simple preview query SELECT FROM E Add To Diagram Add objects selected in Model Explorer to diagram Ed Remove From Diagram Removed objects selected in diagram from diagram J Clear Diagram Remove all objects from diagram iH Save Diagram as Image Save the diagram image to file in JPG or BMP format Modify Diagram Printing Preferences Modify page layout information for printing diagrams Includes margins orientation etc Show Hide Page Grid Show current page boundaries as grid in diagram Since Custom Diagrams do not represent represents the contents of container objects i e Model Category Schema etc its context menus are limited to adding removing objects from diagram and basic diagram related display options 10 3 1 1 3 Transformation Diagram The Transformation Diagram represents a view of the relationships defined by the source inputs described in a view table s SQL transformation N Z 1 El SUPPLIER_ID string 10 El SUPPLIER _ID string 10 E PART_ID string 50 El SUPPLIER_NAME string
142. ions 2 t Package Diagram gt E Alphabetical list_of_products t Categori 2 New Child gt gt Catego ES aai New Sibling gt gt amp Current ite 7 New Association gt gt H Custome Modeling Create Web Service gt El Custome p E Custome t Add To New Custom Diagram Figure 4 11 Modeling Sub Menu for Source Table If a view table is selected the menu would reflect the actions related to virtual operations 83 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide a ki Customerviews xmi gt import declarations 3 ta Package Diagram gt E Alphabetical list_of products F New Child gt E Category aii z New Siblint gt H Current F sigh team gt E custome New Association gt b I Custome Modeling amp f Create Materialized Views b E Custome Create Web Service gt E Customei Generate SOL Relationships Teiid ta Add To New Custom Diagram A of Cut Ctrl x eS a Show Dependency Diagram i Co Ctrl C pra ii Eik Generate Dependency Report Figure 4 12 Modeling Sub Menu for Source Table Teiid Designer also provides specialized object editors to handle complex model objects and their unique properties These objects include This section describes these editors in detail 4 2 1 Transformation Editor The Teiid Designer s Transformation Editor enables you to create the query transformations that describe how to derive your virtual metadata information from phys
143. it box Function to add a function If you click the Function radio button the Predicate Editor looks like this Attribute Constant Function Choose Function below to replace selected Attribute CONCAT PartsSourceA SUPPLIER_PARTS SHIPPER_ID PartsSourceB SUPPLIER SUPPLIER STATUS Figure 4 17 Functions Click the Edit button to use the Expression Builder to construct a function to use in the predicate of your SQL Criterion For more information about the Expression Builder see Step 4 Set a value left side of the predicate and when necessary the right side of the predicate If the right side of the predicate does not require a value of some sort the Criteria Builder will not let you enter one Step 5 Click Apply Step 6 When you have created both a Left Expression and a Right Expression in the Predicate Editor click Apply to add the criterion to the tree view at the top of the dialog box 88 Chapter 4 Creating and Editing Model Objects The criteria clause displays in the Criteria tree You can create complex criteria by joining other criteria with this one To join criteria with this one select the criteria in the Criteria tree and click Delete to remove the selected criterion AND to create a new criterion that must also be true OR to create a new criterion that can be true instead of the selected criterion NOT to establish negative criterion If you join a criterion to t
144. ith The Designer s Preview Data feature makes this possible and allows you to instantly preview the information described by any object whether it s a physical table or a virtual view In other words you can test the views with actual data by simply selecting the table view procedure or XML document Previewing information is a fast and easy way to sample the data Of course to run more complicated queries like what your application likely uses simply execute the VDB Via DTP and type in any query or SQL statement After creating your models you can test them by using the Preview Data action FF By selecting a desired table object and executing the action the results of a simple query will be displayed in the Telid Designer in various view toolbars and context menus There are two requirements for previewing your data the selected object must be one of several previewable model object types and all source models within the model dependency tree must reference a connection profile Model objects that can be previewed include relational tables and views including tables involving access patterns relational procedures Web service operations and XML document Staging tables Note that any virtual table view or procedure is previewable as long as all physical source models After selecting the Preview Data action Designer will insure that all source models are associated with connection profiles and that all required passwords are set I
145. l that reference objects in another model Model Imports keep track of these dependencies within each model A validation error or warning may appear during a build Checking this box will automatically check and update imports during the save process This will result in any unneeded imports being removed from the model or any required imports added to the model If unchecked no updating of imports will be performed Import Logical ER Models as View Relational Models When importing ER models the default 140 Chantar OQ Ilear Drafaranrac lapler J USEI Frererences relational model created during the import process is a Source model This preferences forces the importer to create a View relational model instead Enable Preview If the Designer Runtime feature is installed and a Teiid Instance is defined T eiid Designer will automatically keep the preview artifacts VDBs in sync with the workspace models Unchecking this preference will disable preview feature and not create preview artifacts Enable Preview Teiid Cleanup If operating Designer with Enable Preview TRUE then this preference will result in automatic clean up of your preview artifacts from your Telid servers Any preview VDBs or preview data sources will be undeployed from your servers as part of Eclipse s shut down process Teiid Designer ov x Specify values for general Designer preferences Preview Data VDB Execution Enable auto creating of a source model s d
146. lder either for text you enter when issuing a command or for text displayed by the system Aside from standard usage for presenting the title of a work italics denotes the first use of a new and important term For example Publican is a DocBook publishing system 1 2 Pull quote Conventions Terminal output and source code listings are set off visually from the surrounding text Output sent to a terminal is set in mono spaced roman and presented thus books Desktop documentation drafts mss photos stuff svn books_tests Desktop1 downloads images notes scripts svgs Source code listings are also set in mono spaced roman but add syntax highlighting as follows Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide package org jboss book jca ex1 import javax naming InitialContext public class ExClient public static void main String args throws Exception InitialContext iniCtx new InitialContext Object ref iniCtx lookup EchoBean EchoHome home EchoHome ref Echo echo home create Ssystem out println Created Echo Ssystem out println Echo echo Hello echo echo Hello 1 3 Notes and Warnings Finally we use three visual styles to draw attention to information that might otherwise be overlooked Note Notes are tips shortcuts or alternative approaches to the task at hand Ignoring a note should have no negative consequences but you might miss out on a trick that makes you
147. le type and hit Next e Step 4 In the Telid Profile Wizard page select the New Driver Definition button to locate and select the Telid client jar on your file system Configure your URL using your VDB Name Host Port Username default admin and Password default telid 130 Chapter 7 Testing Your Models Teiid Profile Wizard Specify a Driver and Connection Details Select a driver from the drop down and provide login details for the connection Drivers Teiid Server JDBC Dri P rope rtie s _ _ _ ____ _ General Optional VDB Name Products Username admin Password SSL Connection P m m m mde m e l l a Connect when the wizard completes Test Connection Connect every time the workbench is started lt Back Cancel Finish Figure 7 15 Telid Connection Profile Dialog a Step 5 Select Next to view a summary of your new Telid Connection Profile 131 Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide 132 Summary Tetid Profile Wizard Information gathered from previous pages Property Name Description Auto connect at startup Auto connect on finish Database Host Port Username SSL protocol Save password Value Products false true Products localhost 31000 admin false true URL jdbc teiid Products mm localhost 31000 Cancel Figure 7 16 Teiid Connection Profile Su
148. lt TYPE gt Hardback lt TYPE gt lt AUTHOR_ID gt 49 lt AUTHOR_ID gt lt input gt Figure 5 15 Sample XML Input When using a JSON document your values should match the order of your procedure input parameters as well Here is the input for the above insert procedure ISBN 1 55615 484 4 TITLE Code Complete SUBTITLE A Practical Handbook of Software Construction PUBLISHER 5 PUBLISH_YEAR 1993 EDITION 1 TYPE Hardback AUTHOR_ID 31 Figure 5 16 Sample JSON Input Step 2 Now we need to identify our procedure as REST eligible To do this we add two extended properties to the procedure via the Modeling gt Manage Extended Properties context menu option 112 Chapter 5 Metadata specific Modeling ma L New New Child b T create Data source Spn g Manage Shel ees serge Jes Open With gt amp Set Connection Profile 4 Set Translator Name Copy lin Show Model Statistics Paste Ctri V 5 Update Imports Paste Special Ctrl V view Connection Profile Info Delete a The two required properties are defined in the table below Table 5 2 Required Extended Properties for RESTful Procedures Property Name Description REST MET HOD The HTTP method that will determine the REST mapping of this procedure Supported methods are GET PUT POST and DELETE URI The resource path to the procedure For example if you use books isbn
149. lumn not the contents themselves The second of course represents some business information about the way the column was populated This information although useful to associate with our definition of the column does not reflect the physical storage of the data 1 3 5 Design Time and Runtime Metadata Telid Designer software distinguishes between design time metadata and run time metadata This distinction becomes important if you use the Telid Designer Server Design time data is laden with details and representations that help the user understand and efficiently organize metadata Much of that detail is unnecessary to the underlying system that runs the Virtual Database that you will create Any information that is not absolutely necessary to running the Virtual Database is stripped out of the run time metadata to ensure maximum system performance 1 3 5 1 Design Time Metadata Design time metadata refers to data within your local directory that you have created or have imported You can model this metadata in the Teiid Designer adding Source and View metadata 1 3 5 2 Runtime Metadata Once you have adequately modeled your enterprise information systems including the necessary technical metadata that describes the physical structure of your Sources you can use the metadata for data access TO prepare the metadata for use in the Telid Designer Server you take a snapshot of a metadata model for the Telid Designer Server to use when
150. lustrative Brokerage and FinancialPartners com The partners created the schema broadly 94 A Creating and Editing Mode Objects to cover all possibilities for information they might need to interchange As such the customer information XML document might include a choice compositor based on a list of all products all companies offer However Sample Financial does not offer a credit card so it could exclude those elements from the XML documents its Telid Designer Server creates since it will never have credit card information for an XML document The table on the Choice Editor contains the Include column By default all elements specified by the schema are included You can click to remove the checkmark beside any element you do not want to include within your XML documents generated by this virtual XML document metadata model By removing the checkmark you are not removing the element from the XML Document model you are merely telling the T elid Designer Server that it will never use this element as part of the choice You cannot edit criteria for excluded elements However if you exclude an option for which you have established a criteria Telid Designer will retain the criteria if you want to include the option in the future 4 2 3 3 Editing Choice Criteria To edit the criteria for a choice element Step 1 In the table on the Choice Editor panel select the element you want to edit Step 2 Click Edit Criteria button to
151. mmary Step 6 Select Finish Step 7 Select your new Teiid connection profile and right click select Open SQL Scrapbook enter your designer SQL i e SELECT FROM T ableXXXX select all text and right click select Execute Selected Text Q Parts vdb Connection profile Type Teiid_7 1 S Name Parts Teiid Connecti Database S Status Connected Auto Con SELECT FROM PartsSourceA Parts Figure 7 17 SQL Scrapbook Editor Step 8 Results of query should be displayed in the SQL Results view on the Result1 tab Chapter 7 Testing Your Models E SQL Results 38 aex ela p 7n Status Operation Succee SELECT FROM PartsSourceA Parts Oct 15 2010 Parts Teiid Connection Figure 7 18 SQL Results View 133 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 8 Searching Designer provides multiple search actions located via Telid Designer sub menu in Eclipses Search menu Search menu amp Search Ctrl H El File Ep Remote a Pointcut Matches a Beans Text gt Teiid Designer gt Figure 8 1 Search Options The individual actions in the Telid Designer sub menu are described below By Relationship Launches the Search dialog and auto selects the Relationships tab User can search for models in the workspace by specifying a relationship type participant locations Transformations Launches the Tra
152. mmary tab shown below displays a SQL like version of the current choice criteria Choice Editor bookSetMixed choice Default 3 audioBook ai Pi x 1 hardcoverBook AudioBooks bookSetMixedDocument MappingClasses bookSetMixed TYPE Hardback 2 softcoverBook UCASEfAudioBooks bookSetMixedDocument MappingClasses bookSetMixed TYPE LIKE SOF 3 audioBook AudioBooks bookSetMixedDocument MappingClasses bookSetMixed TYPE IN Books on Tape Books on 8 Track Audio Books on CD Default 3 audioBook it Summary Figure 4 26 Choice Criteria Summary 4 2 3 1 Using the Choice Editor You should address each choice option by performing one of the following Specify a criteria statement for the T eiid Designer Server to apply in order to determine which elements or elements to insert into the result document Exclude or include the option s fragment from the document Set the elements criteria test order Set a default action that occurs if none of the criteria you set is met 4 2 3 2 Excluding Fragments The XML Schema upon which you based the XML Document model determines the nature of the options available to the choice A schema you share with other external sources Such as business partners might include information that you do not want to include within XML files For example Sample Financial Services shares an XML schema with its partners Example Mutual Insurance Il
153. n Profile PartsOraclell JDBC Metadata Processor l Oracle Properties Driver Oracle 11 Thin Driver URL jdbc oracle thin db0025 www mydb com 1521 db25 User Name partssupplier Password PE Figure 3 7 Select JDBC Source Configuration Dialog Step 5 On the Select Database Metadata page select the types of objects in the database to import Press Next gt or Finish gt if enabled Import Database via JDBC Select Database Metadata E Press the Next gt button to continue or the Anish button to finish 44 Foreign Keys Table Types Indexes SYNONYM TABLE C Unique Only f Approximations Allowed E Select All C Procedures c Deselect All peck net gt J cme Figure 3 8 Select Database Metadata Dialog 40 Chapter 3 Importers Step 6 On the Select Database Objects page view the contents of the schema or change selections Select which database schema objects will be used to construct relational objects Press Next gt or Finish gt if enabled Import Database via JDBC Select Database Objects Select the objects to import from database PartsOraclell dexe s Primary Key Impo rted Foreign 3 TABLE_CAT TABLE_SCHEM TABLE_NAME COLUMN NAME DATA TYPE PARTSSUPPLIER PARTS PART_ID 1 PARTSSUPPLIER PARTS PART MAME 12 WARC PARTSSUPPLIER PARTS PART COLOR 12 PARTSSUPPLIER PARTS PART WEIGHT 12 WARCI v W PARTSSU
154. n Teiid Designer s Datatype Hierarchy view select the main menu s Views gt Show View gt Other and select the Teiid Designer gt Datatypes view in the dialog iat Model Expl 5 Outline lt v O anySimplelype xs any Type o anyUR P oF base64Binary Lad BookEdition xs nonNegativelnteger O boolean O date O dateTime v oO decimal O bigdecimal xs decimal O biginteger xs decimal lt v O integer xs decimal t E long xs integer gt O nonNegativelnteger xs integer Datatype details Property Value Defined by whiteSpace collapse decimal fractionDigits 0 integer maxinclusive 9223372036854775807 mininclusive 922337203685477580 pattern 0 9 integer Figure 10 28 Datatype Hierarchy View 165 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide 10 2 10 Telid Model Classes View The Model Classes View provides a hiearchical EMF centric view of the various metamodel classes available within Telid Designer This view is primarily for informational purposes but can be used as a reference if creating relationships or searching your workspace for specific metamodel constructs L tet Model Explorer 5 Outline if Teiid Model Classes 52 h i O dee http www eclipse org emt 2002 Ecore dee http www eclipse org emt 2002 Mapping dee http www eclipse org uml2 3 0 0 UML dee http www eclipse org xsd
155. n all required values are entered click the OK button to execute the query nits Preview Data To execute this procedure input values are required All parameter values are set Select OK to continue Input Parameters colorIn string blue cal Figure 7 6 Procedure Parameter Input Dialog 125 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide 7 2 4 Preview Web Service Operation To preview a Web service operation The operation can be in a view model as well as a source model Step 2 Right click select the Preview Data action 3 You can also select the same action in Step 3 An input parameter input dialog is presented Enter a valid value for each parameter Note that if data entered does not match the parameter datatype String integer etc an error message will be displayed in the dialog header When all required values are entered click the OK button to execute the query ni Preview Data To execute this procedure input values are required 4ll parameter values are set Select OK to continue Input Parameters 10022 AUTHOR ID xs long cmas Figure 7 7 Procedure Parameter Input Dialog 7 2 5 Sample SQL Results for Preview Data Preview Data results are displayed in the Eclipse Datatools SQL Results view as shown below Note there are a number of display preference and filter options for this view via toolbar buttons and the dropdown menu Problems Q Mess
156. n model generation is complete a confirmation dialog should appear Click OK 107 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Generation completed successfully New Model PartsVirtual Input xsd created New Model PartsVirtual Output View xmi created New Model PartsVirtual WS xmi created Figure 5 12 Generation Completed Dialog 5 4 2 Web Services War Generation Telid Designer allows you to expose your VDBs via a SOAP or REST interface JBoSSWS CXF or REST Easy wars can be generated based on models within your VDBs This section describes these wizards in detail 5 4 2 1 Generating a JBoSsWS CXF War The Telid Designer provides web service generation capabilities in the form of a JBoSSWS CXF war source you are ready to expose the web service using the generated war To generate a new JBOSSWS CXF war using the VDB 108 Step 1 Right click on the VDB containing your web service model s and select the Modeling gt Generate JBossWS CXF War action Se ET ee E e E E Dp T e E E pi ee eee b EA MarketDataView Ws Pras _ gt ipia 7 Be MarketDataview Xam E dii ae Deplo E PortfoliovDB vdb eae iis D RestfulBooks Open a ee GE lindateahleRnnkewel Open With gt bas Step 2 Fillin missing properties in Web Service War Generation Wizard shown below Chapter 5 Metadata specific Modeling Create a WAR file to deploy as a Web Service Enter the required information then click
157. nal Source Model aff WSDL into Relational Source Model a WSDL into Web Service Model S XML Schemas gt E XML Figure 3 37 Import WSDL File Into Web Service Model Chapter 3 Importers e Step 3 Input a valid name for your Web Service model and select the Workspace button Locate your workspace WSDL file in the selection dialog and click OK gt Click Next gt to continue Create Web Service from WSDL File WSDL File Selection j Press the Next gt button to continue Web Service Model Name OnHandws Workspace Ale System WSDL Ales Ider Test In JBDS JBDS H45 workspace WSDLImportProject OnHand wsdl Cancel Figure 3 38 WSDL File Selection Dialog 61 62 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide WSDL File Selection Choose a WSDL file to add v E WSDLIimportProject OnHand wsdl Figure 3 39 WSDL File Workspace Selection Dialog s If no WSDL is selected or specified then the importer will only create an empty Web Service model No XML Schema or XML View models will be generated Any referenced files WSDLs or schemas must either be embedded in the WSDL file or exist on your file system s Step 4 The next page is titted Namespace Resolution This page identifies successful and errant WSDL namespace resolution The main WSDL document will essentially always be resolved since the workspace file chooser is used to obtain the path Problems will oc
158. names none Cancel Figure 3 48 Namespace Resolution Dialog Step 6 The next page is titled Schema Workspace Location Selection This page lists all schemas imported by the WSDL along with any dependent schemas referenced within schemas as well as schemas embedded in the WSDL and indicates whether or not they are resolvable All resolved schemas will be created in a separate file and added to the workspace The editor panel allows you to change the default file name of the new schema file s If no errors select Next to proceed or Finish to complete with default option 67 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide SS Create Web Service from WSDL File x Schema Workspace Location Selection All workspace schema locations are valid Click Next to continue Schema Location Information Mej Namespace 4 Editor http localhost Share_BSM_Real_Time_Data Design_Server RealTimeData_port OnHand Folder WSDLImportProject Name without file extension OnHand O S S lt Back Next gt Cancel Figure 3 49 Namespace Resolution Dialog e Step 7 The last page titled XML Model Generation allows you to change the name of the XML View model if the Generate virtual XML document model is checked Input desired name or use the default name provide Select Finish to complete Create Web Service from WSDL File XML Model Generation Ready to gen
159. nes a complete model project containing any number of model XMI or XSD files organized in a user defined directory structure All object references UUIDs within the original project will be replaced with new unique references Any model dependencies or internal object references are refactored to reflect the dependencies within the cloned project Any model references to models in projects external to the original project will NOT be replaced Only XMI and XSD files are cloned All other file types in your project will NOT be processed nor copied into your newly cloned project including VDBs If one or more editors that require Save are open the user will be asked to save them before continuing with the cloning process To clone a model project Step 2 Right click select the Clone Project action or select the Project gt Clone Project action located in the Teiid Designer s main menu bar 119 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide rom AllCustomerAccounts vw g Sources gt Sig Northwind xmi b gt i Customerviews mi gt BooksProject New gt Go Into Open in New Window Copy gt i PartsProject Pasie Ctrl V gt T wsDLimportProject mg j b i mportProjec Delete Refactor gt g2g Import gy Export Refresh Close Project oe Close Unrelated Projects gt Clone Project d Teiid 3 3 EOE Figure 6 8 Clone Project In Context Menu o Metadata Run
160. nsa Identification BookType Name ISBN change CommaSeparatedList Description ISBN using very simple formatting rules A PublicationDate ed PublicationYear ec Base datatype string http www w3 org 2001 KMLSchema change Create subtype of this datatype Prevent Restrictions gt atomic List C Union Open in Datatype Hierarchy view Enterprise Information in this section is required in order to use this type in other models Enterprise Datatype string Inherited from string Hide Built in Datatypes Length Built in Datatypes Length 0 a C Axed 7 Use Default Add Description Minimum Length g fo C Axed 7 Use Default Add Description Maximum Length 5 fo a C Axed 7 Use Default Add Description anySimple Type anyURI base64Binary bigdecimal biginteger blob boolean byte char clob date dateTime Format Whitespace Collapse C Axed Use Default Enumerations Value Description Add M Use Default Patterns Value Description decimal double duration ENTITY float v O Simple Datatypes E Simple Datatypes M E Table Editor Semantics H Source Figure 10 50 Editing String Property Add Add Use Default 0 9 X 10 13 n 10 3 1 4 Semantic Editor The Semantic Editor is a tree based editor for XML Schema elements and attributes 10 3 1 5 Source Editor The Source Editor is a simple text e
161. nsformation Search dialog User can search models in the workspace for matching SQL text Search results appear in the dialog and user can select and view SQL as well as open desired transformations for editing Metadata Launches the Search dialog User can search for models in the workspace by Specifying an Object Type and or a Data Type and or a property value Search results appear in the appropriate editor Find Model Object Launches the Find Model Object dialog which can be used to find an object in the workspace by specifying all or part of its name Selecting the object will open it in the appropriate editor 8 1 Finding Model Objects The Telid Designer provides a name based search capability to quickly locate and display model objects To find a model object Step 1 Open the Find Model Object dialog by either selecting the action on the main Teiid Designer tool bar i Find Seam References Chapter 8 Searching Tetid Designer PartsProject PartsSour Pointcut Matches Beans Find Seam Declarations Text Teiid Designer Eg Relationship i Transformations 4 Metadata Find Model Object Figure 8 2 Find Model Object Action In Toolbar or select the same action via the main menu s Search gt Find Model Object action A pa ae Find Model Object PART COLOR PART ID PART NAME PART WEIGHT PARTS mn r pen Parro measa nnr Locations
162. objects W Unique Constraint Figure 4 7 New Sibling Action In Diagram Step 3 The new model object displays on the diagram and is highlighted for renaming Step 1 Select the row for the object to which you want to add a sibling For example you can add a column sibling to a column Step 2 Right click on a row From the pop up menu select New Sibling You can now select the sibling object you would like to add I a PartsDB2 xmi 4 i A Parts Views xmi Base Tables E Columns F Foreign Keys F Primary Keys Location Name Name In Source System Cardinality Supports Up Materialized Logic i PARTS PARTS New Child gt false SHIP_WIA SHIP_VIA New Sibling gt Base Table SIUS SINS New Association gt Catalog SUPPLIER SUPPLIER S f Modeling gt m ndex SUPPLIER_PARTS SUPPLIER L Logical Relationship E Procedure Paki Undo Delete multiple objects Schema of Cut Ctrl X E view Copy Ctrl C 43 Custom Diagram Figure 4 8 New Sibling Action In Table Editor Step 3 The selected tab in the Table Editor changes to the tab for the child object type the new model object row is displayed and the row s name table cell is highlighted for renaming 4 1 3 New Association Action Step 1 Select two objects you wish to associate For example select columns in different base tables Step 2 Right click From the pop up menu select New Association gt Foreign Key Relationship 8
163. ocation WSDLimportProject XML Model OnHandWSResponses Figure 3 43 Namespace Resolution Dialog In order to successfully generate Web Services from WSDL the WSDL must be error free WSDL validation is performed during Step 3 above If errors do exist a error summary dialog will be displayed shown below and you will not be able to Finish the wizard until the WSDL problems are fixed or you re import and select a valid WSDL file Create Web Service from WSDL File Validation Problems x One or more selected WSDL files have errors Please correct or remove the file s to proceed WSDL Validation Panel a message wsdl file eve elt 1 Cannot find the declaration of element wsdl definitions http terraservice net terraservice2 asmx wsdl Cancel Figure 3 44 WSDL Validation Problems Dialog 3 2 Import WSDL From File System Location 64 Chapter 3 Importers You can create a Web Service model by selecting a WSDL file from your local file system Step 1 Choose the File Import choose the File gt Import action u in the toolbar or select a project folder or model in the tree and choose Import Step 2 Select the import option Teiid Designer gt WSDL File or URL gt gt Web Service Model and click Next gt Select Create Web Service Model from WSDL file from file system Select an import source ww Teid Designer M DDL into Relational Model Er Flat Ale
164. odel This option is only applicable for creating a relational view model from a relational source model with the added feature of creating default transformations SELECT FROM SourceModel T able_X for each above There is an additional option in the second page of the wizard which can automatically set the relational table s supports update property to false If this is unchecked the default value will be true 2 2 3 Create From XML Schema In the Teiid Designer you can use your existing schema models to generate relational view tables To create a new relational view model from XML schema tree Step 2 Right click to display the context menu and select the Modeling gt Create Relational View Model from Schema action Step 3 In the Create Virtual Tables from XSD Schema Wizard dialog specify a relational view model name 25 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Create Virtual Tables from XML Schema Wizard Create Virtual Tables from XSD Global Entities Click Anish to create virtual tables Location BooksProject Browse Model Name Books Global Entities Entites used to create Tables BookSetMixed e bookCollection BooksNS BookSe Bibliography e bookListing BooksNS BookSetFlz AudioBook BooksNS BookNes e bibliography BooksNS Bibliograg BookSetNested e bookSetMixed BooksNS BookSet BookFlat PublishingInformation El RookNested Keep sorted alphabetically
165. odel in the tree and choose Import e Step 2 Select the import option Teiid Designer gt Designer Text File gt gt Source or View Models and click Next gt Select Import metadata from a specialhy formatted text file into a new or existing model Select an import source ww Teid Designer DDL into Relational Model Er Flat Ale Source gt gt Source and View Model Metadata from JDBC Database a Metadata from Text Ales on file system Y Salesforce as Relational Source Model WSDL into Relational Source Model ay WSDL into Web Service Model S XML Schemas gt XML Figure 3 25 Import From Designer Text File e Step 3 Select an import type via the drop down menu shown below Import Metadata From Text File Select Import Type CA 1g G ioi Pror p Select the type of text file import desired bg 4 Import Type HOE WGI EME v Relational Tables Purpose Im model Relational Virtual Tables 1 Sc Datatypes gt gt Locations are of the form ProjectName FolderName ModelName SchemaName oa gt gt If the project folder model or schema catalog containers do not exist they will be created 2 The Column data is expected to be in the form gt gt COLUMN ColumnName IDBCTvne Lenath Description Figure 3 26 Import Wizard These steps required for each type are defined below 3 5 1 Import Relational Table Metadata From Text File 53 Red
166. olbar or select a project folder or model in the tree and choose Import Step 2 Select the import option Teiid Designer gt WSDL File or URL gt gt Source Model and click Next gt Select Create Relational Model from WSDL Select an import source p r r Teiid Designer DDL into Relational Model Er Flat Ale Source gt gt Source and View Model Metadata from JDBC Database Metadata from Text Ales on file system NM Salesforce as Relational Source Model a WSDL into Relational Source Model WSDL into Web Service Model S XML Schemas gt E XML Figure 3 33 Import from WSDL into Source Model Step 3 On the next page select an existing Web Service Connection Profile from the list or click the New Button to create a new profile o 58 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Cy S Source and Target Selection Connection Profile OnHand i New Edit WS5DL URL or Location fhome blafond Test Designer Fol example files wsdls OnHand wsdl Target Workspace Folder wsDLimportProject O O Browse Figure 3 34 Source and Target Selection Dialog Step 4 When the connection profile is selected you ll be required to validate your WSDL via the Validate WSDL button see above figure If the WSDL is not valid or does not comply with WS I 1 0 the validation failures will be displayed in an error dialog Step 5 Select a model projec
167. old and all distinguishable thanks to context Key combinations can be distinguished from an individual key by the plus sign that connects each part of a key combination For example Press Enter to execute the command Press Ctr1 A1Lt F2 to switch to a virtual terminal The first example highlights a particular key to press The second example highlights a key combination a set of three keys pressed simultaneously If source code Is discussed class names methods functions variable names and returned values mentioned within a paragraph will be presented as above in mono spaced bold For example File related classes include filesystem for file systems file for files and dir for directories Each class has its own associated set of permissions Proportional Bold This denotes words or phrases encountered on a system including application names dialog box text labeled buttons check box and radio button labels menu titles and submenu titles For example Choose System Preferences Mouse from the main menu bar to launch Mouse Preferences In the Buttons tab select the Left handed mouse check box and click Close to switch the primary mouse button from the left to the right making the mouse Suitable for use in the left hand To insert a special character into a gedit file choose Applications Accessories Character Map from the main menu bar Next choose Search Find fromthe Character Map menu bar type the
168. olumns gt lt columns xmi uuid mmuuid be4dee7 cl 413b 1079 9d18 S8acf4a7127d5 name DESCRIPTION nameInSource DESCRIPTION nat lt type href http www w3 org 2001 KMLSchema tstring gt lt columns gt lt columns xmi uuid mmuuid be4ee7c2 413b 1079 9d18 S8acf4a7127d5 name PICTURE nameInSource PICTURE nativeType lt type href http www metamatrix com metamodels SinpleDatatypes instance tblob gt lt columns gt lt primaryKey smi uuid mmuuid d481f940 413b 1079 9d18 8acf4a7127d5 name PK CATEGORIES nameInSource PK_CATEGORII lt relational BaseTable gt Figure 1 4 Sample Model File Model files should never be modified by hand While it is possible to do so there is the possibility that you may corrupt the file such that it cannot be used within the Telid Designer system The fundamental models in Teiid Designer define the structural and data characteristics of the information contained in data sources These are referred to as source models represented by Cis Telid Designer uses the information in source models to federate the information in multiple sources so that from a user s viewpoint these all appear to be in a single source Model Internals Entity Metadata relationship imported 7 DAMS Metadata Figure 1 5 Model Internals In addition to source models Teiid Designer provides the ability to define a variety of view models represented by Ta These c
169. on Editor Preferences diagram layout and default view entity properties 144 Chapter 9 User Preferences Editor ale F XML Document Mapping Settings SQL Clauses Start Clauses on New Line Indent Clause Content Auto expand default SELECT FROM on construction Diagram Layout View and Sources O Tree Layout Miscellaneous Default String Length 10 Figure 9 7 Transformation Editor Preferences Panel 9 1 3 4 VDB Editor Preferences Editor ale z XML Document Mapping Settings Transformation Table VDB Figure 9 8 VDB Editor Preferences Panel 9 1 4 Validation Preferences Validation Preferences provide a way to customize the severity of some of the rules checked during model validation Validation preference pages shown below include Core Relational Model XML related and XML Schema XSD models Validation coe Specify the Severity Level for validation related occurrences Core Relational XSD XML Core Validation Control Settings Multiple EQbjects with same uuid Ignore String functions SUBSTRING LOCATE and INSERT 0 to 1 base check Warning Figure 9 9 Core Model Validation Preferences Panel 145 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Validation cow Specify the Severity Level for validation related occurrences Relational Validation Control Settings Missing length property on colurnns with string or character types
170. oper Studio 4 1 Teiid Designer User Guide 10 3 2 1 Editing Data Roles Telid Designer provides a means to create edit and manage data roles specific to a VDB Once deployed within a Telid server with the security option turned on by default any query run against this VDB via a Telid JDBC connection will adhere to the data access permissions defined by the VDB s data roles The VDB Editor contains a VDB Data Roles section consisting of a List of current data roles and New Fdit and Remove action buttons sE VDB Description Data Role Description NoAccountHoldingsAccess Client cannot access customer account holdings financial product info VirtualOnly Client users can only access virtual layer Access requests to physical sources will be denied i dy y Figure 10 53 VDB Data Roles Panel Clicking New or Edit will launch the New VDB Data Role editor dialog Speicify a unique data role name add a optional description and modify the individual model element CRUD values by check or unchecking entries in the models section New VDB Data Role New VDB Data Role Select Anish to sawe data role Name Inventory Description Allow usage of temporary tables Apply this role to All Users Mapped Role Names POETEI TEITEI TIITEL ITIITI III ITIITI IIIT TIITII IEIET TIITII T gt E ProductData gt E ProductSymbols System Tables Access Allow this role to access SYSADMIN model
171. or and will show the generated view tables containing the completed SQL required to access the data in your flat file using the getFiles procedure above and 47 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide the Telid TEXT TABLE function The following figure is an example of a generated view table SOURCES A A A A A A A A A A A A A A A A A A A A A A A A A A e4 Transformation Diagram E Table Editor T r R 7 EQ Cursor at 3 6 Supports Update BR y fs E SELECT A LastName A FirstName A MiddleName A Empld A Department A AnnualSalary A Title AHomePhone A Marid A Street A City A State A ZipCode FROM EXEC EmployeeSource getTextFiles EmployeeData txt AS f TEXTTABLE f file COLUMNS LastName string FirstName string MiddleName string Empld string Department string AnnualSalary string Title string HomePhone string Mgrid string Street string City string State string ZipCode string HEADER ASA Figure 3 18 Generated Flat File View Table 3 4 Import From Salesforce You can create relational source models from your Salesforce connection using the steps below Depending the detail provided in the database connection url information and schema Steps 5 through 7 may not be required e Step 1 In Model Explorer choose the File gt Import action t jn the toolbar or select a project folder or model in the tree and choose Import e Step 2
172. orm gt gt TableName SQL Statement Description A sample of typical input data is shown below Sample Ale Format VTablel SELECT FROM PMod1 PTabl1 PMod1 PTable2 Descrip no embedded quotes VTable2 SELECT FROM PMod1 PTab2 Descrip 2 with quotes xxx VTable3 SELECT FROM PMod1 PTab3 Descrip 3 Figure 3 29 Select Import Type Relational Virtual Tables Step 4 In the next page you ll need to provide a source text file containing the metadata formatted to the specifications on the previous page Import Metadata From Text File Select Source Text File and Target Virtual Relational Model Select CSV Ale to Import and Destination Model or model folder Select Source Text Ale Browse Target Location Browse Ale Contents Cancel Figure 3 30 Select Source Text File and Target Virtual Relational Model Step 5 Select an existing relational virtual model as the target location for your new model components using the Browse button to open the Virtual Model Selector Dialog Select a virtual relational model from your workspace or specify a unique name to create a new model Step 6 Select Finish 3 5 3 Import Datatypes Metadata From Text File To create datatypes from imported text file metadata 99 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Perform Steps 1 through 3 above and select the Datatypes import type then click Next gt fsa Impo
173. ort From Flat File Source You can import metadata from your flat file data sources and create the metmodels required to query your data in minutes Using the steps below you will define your flat file data source configure your parsing paramaters for the flat file generate a source model containing the standard T eiid flat file procedures and create view tables containing the SQL defining the column data in your flat file Telid Supports Flat Files as data sources In release 7 5 Telid Designer introduces a new Import wizard designed to assist in creating the metadata models required to access the data in your flat files AS with Designer s JDBC Salesforce and WSDL importers the Flat File importer is based on utilizing a specific Data Tools Connection Profile The results of the importer will include a source model containing the three Flat File procedures Supported by T eiid Namely getFiles getT extFiles saveFile The importer will also create a new view model containing a view table for each of your selected flat file source files Within these view tables will be generated SQL transformations containing the getT extFiles procedure from your source model as well as the column definitions and parameters required for the Telid TEXT TABLE function used to query the data file You can also choose to update an existing view model instead of creating a new view model The TEXTTABLE function as defined in the Teiid documentation
174. orthwind xmi aNG EH ye we Ii BR Package Diagram Table Editor 10 2 3 Teiid View The Teiid View provides a means to display and manage Teiid server instances and their contents within Designer To show the Teiid View click Views gt Show View gt Other to display the Show View dialog Choose Teiid Designer gt Teiid view and hit OK 155 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide o Teiid 32 A mms 10 111 12 222 12345 E A mms 11 11 111 11 31444 amp Data Sources VDBs 34 mms localhost 31443 F amp Data Sources 0 BooksDB2 0 PartsSourceB 0 PartsSOL2000 amp vDBs i PartsVDB Figure 10 13 Teiid View To create a new Teiid instance either right click select New Telid Instance action or click the same action button A in the toolbar You ll get the New Telid Instance dialog shown below 156 Chapter 10 Teiid Designer Ui Reference New Teiid Instance Enter Teiid Instance Information Define the Teiid Instance connection information Host localhost Label Use host URL as label O Use a custom label Tetid Admin Connection Info Port number 1448 User name admin Password doar Save URL imms localhost 31443 SSL W Set as default Teiid instance on Anish Test Tetid JDBC Connection Info Port number 31000 User name user Password 4 M7 Save URL
175. ose from workspace set the Model folder location enter or select valid model name set Model type Source Model or View Model set desired options and click Next gt or Finish gt if enabled Chapter 3 Importers Import DOL i i a Provide DDL source Update relational source model ProductsSQLServer using DDL file home Fs blafond Runtime Workspaces test_7 1 0 E DDLTest ProductsSQLServer ddl Choose from file system BDL file fhome blafond Runtime Workspaces test Choose from workspace Model folder DDLTest Choose Model name ProductsSOLServer Choose Model type Source Model 2 Create model entities for DDL defined by unsupported DML le g Views y DDL file contents EATE TABLE ProductData roductiD VARCHAR 10 NOT NULL roductName VARCHARI60 ProductType VARCHARI 15 ISSUER VARCHAR 10 EXCHANGE VARCHAR 10 B lComponent NUMERIC 1 NOT NULL SPSO0Component NUMERIC 1 NOT NULL NAS100Component NUMERIC 1 NOT NULL AMEXINTComponent NUMERIC 1 NOT NULL PrimaryBusiness WARCHAR 30 generated from ProductSymbols lt Back Cancel Finish Figure 3 3 DDL Import Options 5 Step 4 If Next gt is pressed a difference report is presented for viewing or de selecting individual relational entities Press Finish gt to complete 37 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Import DDL Review Model Updates E Rewiew the changes that will be applied to your mo
176. ou wish to associate For example select columns in different base tables e Step 2 Right click From the pop up menu select New Association gt Foreign Key 82 Chapter 4 Creating and Editing Model Objects Relationship Step 3 New Foreign Key and Primary Key objects will be added to the contents of their respective tabs in the Table Editor The Column Foreign Key Primary Key reference properties are properly set on the selected columns new primary key and new foreign key 4 2 Model Object Editors The primary actions for editing model objects are ef Cut Deletes the selected object s and copies it to the clipboard FE Copy Copies the selected object s to the clipboard Paste Pastes the contents of the clipboard to the selected context Clone Duplicates the selected object in the same location with the same name user is able to rename the new object right in the tree Delete Deletes the selected object s Rename Allows a user to rename an object These actions are presented in Telid Designer s main Edit menu and also in the right click context Modeling Sub Menu In addition to the New Child Sibling Association menus available for object creation Designer provides a Modeling gt sub menu which presents various object specific actions which can be performed If you select a source table for instance the modeling menu below would be presented v fa Northwind xmi gt ail import declarat
177. ound In Any Resource Selected Resources 0 selected participant resources Name Containing text W Case sensitive any string any character escape for literals Scope Workspace O Selected resources Working set Choose Customize Cancel Search ed Figure 8 4 Relationship Search Dialog Step 2 Specify desired search options for Object Type location of Participants and Name Step 3 Click Search The search will be performed and the results will be displayed in the 8 3 Search Transformation SQL The Telid Designer provides a search capability to string values present in transformation SQL text 136 Chapter 8 Searching To search for string values in your transformations SQL Step 1 Select Search gt Transformations action on the Telid Designer main menu which opens the Search Transformations dialog Search Trantormations Input Find Parts ww C Case Sensitive Perform Search Search Status Search complete for Parts Virtual Tables Views Procedures Operations 2 SQL matches for Parts lt H Supplierlnfo lt Table gt PartsProject PartsVirtual xmi 12 SELECT lt v E partsByColor lt Procedure gt PartsProject PartsVirtual xmi 1 SELECT SELECT SQL String CREATE VIRTUAL PROCEDURE BEGIN SELECT FROM PartsSourceB PARTS WHERE PartsSourceB PARTS PART COLOR PARTSVIRTUAL PARTS
178. perations and operation input and output parameters in the form of XML Schemas Model Extensions for defining property name value extensions to other model classes Function The Function metamodel supports the capability to provide user defined functions including binary source jars to use in custom transformation SQL statements Models and VDBs Models used for data integration are packaged into a virtual database VDB The models must be ina complete and consistent state when used for data integration That is the VDB must contain all the models and all resources they depend upon VDB s are the transport mechanism to expose both the metadata to query against on a server and the corresponding references to the data sources and Models and Connection Profiles A connection profile provides the connectivity to a data source and is defined by the DTP framework Designer utilizes this framework from withing it s JDBC Importer Model Validation Chapter 1 Introduction Models must be in a valid state in order to be used for data access Validation of a single model means that it must be in a self consistent and complete state meaning that there are no missing pieces and no references to non existent entities Validation of multiple models checks that all inter model dependencies are present and resolvable Models must always be validated when they are deployed in a VDB for data access purposes Telid Designer will automatically
179. plorer Simply click the action and select from a list of views tables procedures or operations from the currently edited model Cursor at 1 1 Cursor Position line column shows the current line and column position of the insertion cursor For example Cursor Position 1 4 indicates that the cursor is presently located at column 4 of line 1 Supports Update Supports Update checkbox allows you to enable or disable updates for the current transformation target If Supports Update is checked the editor shows four tabs at the bottom for the Select Update Insert and Delete transformations If Supports Update is unchecked all updates are disabled and only the Select transformation is displayed BY Reconcile allows you to resolve any discrepancies between the transformation symbols and the target attributes Pressing this button will display the Reconcile Virtual Target Attributes dialog box in which you can resolve discrepancies Vi Save Validate saves edits to the current transformation and validates the transformation SQL Any Warning or Error messages will be displayed at the bottom of the editor in the messages area If the SQL validates without error the message area is not displayed Criteria Builder allows you to build a criteria clause in your transformation The button will Pad Hat JBoss Developer Stu dio 4 1 Tei id Designer lJeer Guide Red Hat JBOSS Developer studio 4 1 tenda Desi gii er User GUIGE L
180. procedure Web Service operation XML Document staging table A Note If attempting to preview a relational access pattern a web service operation or a relational procedure with input parameters a dialog will request values for required parameters 19 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 2 New Model Wizards Models are the primary resource used by the Teiid Designer Creating models can be accomplished by either directly importing existing metadata or by creating them using one of several New Model wizard options This section describes these wizards in detail The Telid Designer currently supports the following types of models Use one of the following options to launch the New Model Wizard New Model Wizard Choose the File gt New gt Metadata Model action a the right click menu ma a a Select the New button on the main toolbar ci and select the Metadata Model action he Model names are required to be unique within Designer When specifying model names in new model wizards and dialogues error messages will be presented and you will prevented from entering an existing name 20 Chapter 2 New Model Wizards New Model Wizard New Model Wizard Specify model name and options then create model file Location NorthwindSales Browse Model Name Northwind Model Class Relational Model Type Source Model Select a model bu
181. processes character input to produce tabular ouptut It supports both fixed and delimited file format parsing The function itself defines what columns it projects The TEXT TABLE function is implicitly a nested table and may be correlated to preceeding FROM clause entries TEXTTABLE expression COLUMNS lt COLUMN gt DELIMITER char QUOTE ESCAPE char HEADER integer SKIP integer AS name Telid Designer will construct the full SQL statement for each view table in the form SELECT A Name A Sport A Position A Team A City A StateCode A AnnualSalary FROM EXEC PlayerDataSource getTextFiles PlayerData txt AS f TEXTTABLE f file COLUMNS Name string Sport string Position string Team String City string StateCode string AnnualSalary string HEADER 2 SKIP 3 AS A 42 Chapter 3 Importers Step 1 In Model Explorer choose the File gt Import action tu in the toolbar or select a project folder or model in the tree and choose Import Step 2 Select the import option Teiid Designer gt Flat File Source gt gt Source and View Model and click Next gt Select Import metadata from Flat Ale into a new or existing relational model using Data tools Flat Ale connection profile Select an import source Teid Designer M DDL into Relational Model BF Flat Ale Source gt gt Source and View Model Metadata from JDBC Database Metadata from Text Ales on file system NM Salesforce as Relational Source Mo
182. r You can show the Outline View by clicking on its tab If there is no open editors the view indicates that Outline is not available If a Model Editor is open then the root of the displayed tree will be the model for the editor that is currently in focus in Telid Designer tab on top 10 2 2 1 Outline Tree View This tree view provides the same basic editing and navigation behavior as the Model Explorer One additional capability is the drag and drop feature which provides re ordering and re parenting of objects in a model iat Model Explorer 5 Outline 3 v A PartsVirtual xmi gt import declarations 4 Ha Package Diagram gt El Supplierinfo gt A partsByColor Figure 10 11 Outline View 10 2 2 2 Outline Thumbnail View The Outline View also offers you a way to view a thumbnail sketch of your diagram regardless of its size To view this diagram thumbnail from the Outline panel click the Diagram Overview button at the top of the view The diagram overview displays in the Outline View 154 Chapter 10 Teiid Designer Ui Reference Gh Model Explorer d Outline s H Fi EB I y ppm Figure 10 12 Outline View The view contains a thumbnail of your entire diagram The shaded portion represents the portion visible in the Diagram Editor view To move to a specific portion of your diagram click the shaded area and drag to the position you want displayed in the Diagram Editor view G N
183. r Customer Portal content unchanged Revision 4 1 1 15 1 2013 06 10 Misty Stanley Jones Rebuild for updated legal template Revision 4 1 1 15 2012 07 18 Anthony Towns Rebuild for Publican 3 0 Revision 1 0 Fri Sep 16 2011 Barry Lafond Updated for JBoss Developer Studio 4 1 1 Revision 0 0 Tue Jul 06 2010 Isaac Rooskov Initial creation of book by publican
184. r life easier Important Important boxes detail things that are easily missed configuration changes that only apply to the current session or services that need restarting before an update will apply Ignoring a box labeled Important will not cause data loss but may cause irritation and frustration Warnings should not be ignored Ignoring warnings will most likely cause data loss 2 We Need Feedback If you find a typographical error in this manual or if you have thought of a way to make this manual better we would love to hear from you Please submit a report in JIRA against JBoss Developer Studio When submitting a bug report be sure to mention the manual s name and to select the documentation component If you have a suggestion for improving the documentation try to be as specific as possible when describing it If you have found an error please include the section number and some of the surrounding Preface text so we can find it easily Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 1 Introduction The Telid Designer User s Guide provides detailed descriptions of Teiid Designer features and functionality 1 1 What is Telid Designer Telid Designer is an Eclipse based graphical modeling tool for modeling analyzing integrating and testing multiple data sources to produce Relational XML and Web Service Views that expose your business data y Tetid Designer A EA a a aa J
185. r transformations To open the Input Set Editor either double click the input set in the Mapping Transformation Diagram or click the edit button on the Input Set in the diagram see below F B lt lt Input Set gt gt Input Set isbn string Figure 4 22 Edit Input Set Button Input Set Editor be t isbn string B book isbn string ppr E isbn string E type string EJ title string EY publisher string E publishDate string EJ edition string JTA Figure 4 23 Input Set Editor Panel The Input Parameters table contains a list of mapping attributes within the input set and the mapping attributes bound to input set mapping attributes The tree on the right displays the parent mapping classes and the attributes available from each Using the Input Set Editor you can Add a mapping attribute from a parent mapping class to the Input Set In the tree on the right select the symbol for which you want to create an attribute and click New The item displays in the Input Parameters and Mapping Class Bindings table Delete a mapping attribute from the Input Set Click the row in the Input Parameters and Mapping Class Bindings table that you want to delete and click Delete The Teiid Designer removes this row from the table and this mapping attribute from your Input Set Bind and Unbind Input Parameters Once you have created the mapping attributes within the Input Set that you need you can us
186. relationships between those entities required to fully define the integration of information sets so that they may be accessed in a uniform manner using a single API and access protocol The file extension used for these models is xmi Example NorthwindOracle xmi which adheres to the XMI syntax defined by the OMG Below is an example of the partial contents of a model file lt uml version 1 0 encoding ASCII gt lt xmi EMI xumi version 2 0 xumlns xmi http www omg org ZMI xumlns xsi http www w3 org 2001 XMLSchema instance xr lt mmcore ModelAnnotation xmi uuid mmuuid b0355f00 413b 1079 9d18 S8acf4da7127d5 description Northwind_Oracle was cre lt modelImports xmi uuid mmuuid 2d815780 4140 1079 9d18 S8acf4a7127d5 name XMLSchema modelLocation http www w lt modeliImports xmi uuid mmuuid 26663940 4140 1079 9d18 S8acf4a7127d5 name SinpleDatatypes instance modelLocatior lt mncore ModelAnnotation gt lt relational BaseTable xmi uuid mmuuid b20e64c0 413b 1079 9d18 S8acf4a7127d5 name CATEGORIES nameInSource CATEGO lt columns xmi uuid mmuuid bbSac3c0 413b 1079 9d18 S8acf4a7127d5 name CATEGORYID nameInSource CATEGORYID native lt type href http www w3 org 2001 KMLSchenatlong gt lt columns gt lt columns xmi uuid mmuuid bed4dee7 c0 413b 1079 9d18 S8acf4a7127d5 name CATEGORYNANE nameInSource CATEGORYNAME n lt type href http www w3 org 2001 KNLSchema tstring gt lt c
187. rise uses the information and the different terminology that refers to that information They do so in a central location Our example enterprise information sources the address book database and the vendor supplied comma delimited text file reside in two different native storage formats and therefore have two Source Metadata models However they can represent one business need a pool of addresses for a mass mailing By creating a View Metadata model we could accurately show that this single View Table the AddressPool contains information from the two enterprise information systems The View Metadata model not only shows from where it gets the information but also the SQL operations it performs to select its information from its source models This View Metadata can not only reflect and describe how your organization uses that information but if your enterprise uses the Telid Designer Server your applications can use the View Metadata to resolve queries To create this View Metadata you create a view and define a transformation for that view a special query that enables you to select information from the source or even other view metadata models For more information see Section 4 2 1 Transformation Editor 1 3 6 3 Modeling Metadata Transformations Section on Modeling transformations 1 3 6 3 1 Metadata Transformations By modeling View Metadata you can illustrate the business view of your enterprise information
188. rom Text Ales on file system NM Salesforce as Relational Source Model WSDL into Relational Source Model WSDL into Web Service Model Ei XML Schemas Figure 3 59 Import XSD Schemas a Step 3 Select either Import XSD Schemas from file system or Import XSD Schemas via URL and click Next gt Step 4a If importing from file system the Import XSD Files dialog is displayed Click on the Browse button to find the directory that contains the XSD file s you wish to import To Select all of the XSD files in the directory click the checkbox next to the folder in the left panel To select individual XSD files click the checkboxes next to the files you want in the right panel Chapter 3 Importers Import XML Schema Files File system Import resources from the local file system E books C x BookDatatypes xsd Fy Books xsd _ x BooksInput xsd Alter Types Select All Deselect All Into folder BooksProject Options Overwrite existing resources without warning Create complete folder structure O Create selected folders only Adwanced gt gt Add Dependent Schema Ales lt Back Yext gt Cancel Anish Figure 3 60 Select XSD From File System e Step 4b If importing from URL select the Import XML Schemas via URL option and click OK to display the final Add XML Schema URLs wizard page 75 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Import XML Schema Files Add XML S
189. rse the Telid Designer Server should take if none of the criteria you set evaluates to true You can set this default using the combo box available in the Choice Editor s toolbar to Any of the options within the table except those you have excluded from the document THROW to throw a Telid Designer Server exception RECORD to record the Telid Designer Server exception et ww w tJ Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide DISCARD to place no element within the XML instance document Note You must set a default action for your choice criteria 4 2 4 Recursion Editor XML Some XML schemas define data structures that contain self referencing elements or datatypes When generating XML documents such data structures can produce an endless repetition of nested tags This self nesting pattern is Known as recursion When generating virtual documents from XML Schema the Teiid Designer detects recursive data structures in the XML Schema model and halts the recursive nesting pattern after two cycles These two cycles serve different purposes when mapping the document The first cycle can be thought of as an entry condition for the recursion The mapping class located at this node defines a normal mapping transformation like that of any other in the document model The second cycle defines a mapping transformation that will be performed repeatedly until conditions are met that will halt the document instance being
190. rt Metadata From Text File x Select Import Type Select the type of text file import desired D Import Type Patatypes Purpose Imports datatypes from a CSV text file into a datatype model Datatype data is expected to be of the form gt gt TYPE or ENUM Name Description baseTypeName Length MinLength MaxLength MinBound MinInclusive MaxBound Maxinclusive TotalDigits FractionDigits Blank or zero values are ignored A sample of typical input data is shown below Sample Fle Format TYPETAG Name Description Base Type Length MinLength MaxLength MinBound MinInclusive MaxBound Maxinclusive TotalDigits Fraction Digits TYPE Atomicl Description for Typel BType 5 1 10 1 2 1 2 5 2 TYPE Atomic2 Description for Type2 Blype 5 1 10 1 2 1 2 5 2 Figure 3 31 Select Import Type Datatypes Step 4 In the next page you ll need to provide a source text file containing the metadata formatted to the specifications on the previous page Import Metadata From Text File Select Source Text File and Target Datatypes Model Select CSV Ale to Import and Destination Model or model folder Select Source Text Ale Target Location Browse Ale Contents Cancel Figure 3 32 Select Source Text File and Datatypes Model Step 5 Select an existing datatype model as the target location for your new model components using the Browse button to open the Datatypes Model Selector Dialog
191. rvice Enter the required information then click OK to create the WAR file REST WAR Creation Information Context Name VDB JNDI Name REST WAR File Save Location BooksREST REPLACE WITH_VDB_JNDI_NAME ih ome tejones Runtime Workspaces WARFiles Change Include RESTEasy Jars in lib Folder of WAR Restore Default Figure 5 17 Generate a REST WAR War File Dialog Table 5 3 Field Descriptions Field Name Description Name The name of the generated war file Connection JNDI Name The JNDI connection name to the deployed Teiid source VDB The folder where the generated WAR file should be saved If selected the REST Easy jars and there dependent jars will be included in the lib foled of the generated WAR If not selected the jars will not be included This should be de selected in environments where REST Easy is installed in the classpath of the server installation to avoid conflicts War File Save Location Include REST Easy Jars in lib Folder of WAR Step 6 Click OK to generate the REST war When war generation is complete a confirmation dialog should appear Click OK 114 Chapter 5 Metadata specific Modeling REST WAR File Created The REST WAR file BooksREST was successfully created Figure 5 18 Generation Completed Dialog 115 Red Hat JBoss Developer Studio 4 1 Teiid Designer User
192. s An instance of a Teiid Connection Profile configured for the deployed VDB Telid Designer simplifies this process via Deploy VDB and Execute VDB actions Deploy VDB does just that deploy a selected VDB to a running Teiid instance Execute VDB performs the VDB deployment creates a Telid Connection Profile opens the Database Development perspective and creates a connection to your VDB 7 3 1 Creating Data Sources The mechanism by which VDBs are able to query actual data sources is the Data Source These are deployed configurations backed by database or source connection jars Each source model referenced within a VDB requiries a JNDI name representing a deployed Data Source When creating VDBs you do not need to have deployed data sources on your Teiid server but if you wish to test your VDB the data sources need to be present Telid Designer provides a Create Data Source action so you can create compatible data sources for your source model If you wish to create a data source for a specific model you can select that source model in your workspace and select the Modeling gt Create Data Source action This will extract the connection profile data from your source model and create a corresponding data source on your default Telid server You can also create data sources from the T elid view Select a Telid server instance in the Telid view and right click select the Create Data Source action This will launch the Create Data Source Dialog
193. s in focus the Insert Table Rows action is added to the application s main toolbar A few Table Editor actions are contributed to the right click menu for selected table rows These actions described and shown below include Table Paste Paste common spreadsheet data like Microsoft Excel to set object properties Table Editor Preferences Change table editor preferences including customizing visible properties Insert Rows Create multiple new sibling objects E9 Refresh Table Refreshes the contents of the current Table Editor to insure it is in sync with the model 176 Name Name In Source Syste PA a New Child New Sibling New Association Modeling Ctrl x Copy Ctrl C E Table Paste Clone 7 T h Copy Name al part Rename ag dler ce Hodel k 4odel F 4dodel F dodel Aadel F dled g dled W Add to Metadata Favorites if t Open in Relationship Navigator Run As Debug As Profile As Validate Mark as Deployable Team Compare With Replace With ART Guynor Table Editor Preferences Insert Rows 1 8 KB Gs Refresh Table 5 KB L1 JPEG image Tue OF Sep 201 Figure 10 43 Table Editor Example 10 3 1 2 1 Editing Properties You can edit properties for an object by double clicking a table cell Chapter 10 Teiid Designer Ui Reference For String properties the table cell will become an in place text editor field 177 Red Hat JBoss Developer Studio 4 1 Teiid D
194. sSourceA SUPPLIER_PARTS SUPPLIER_ID PartsSou ice SQL View PartsSourceA SUPPLIER _PARTS SUPPLIER_ID PartsSourceB SUPPLIER SUPPLIER_ID Criteria Editors Attribute Constant Function Attribute Constant Function Value is unchanged Value is unchanged vV E PartsSourceA SUPPLIER_PARTS A PartsSourceA SUPPLIER_PARTS SUPPLIER_ID PartsSourceA SUPPLIER_PARTS PART_ID PartsSourceA SUPPLIER_PARTS QUANTITY PartsSourceA SUPPLIER_PARTS SHIPPER_ID vV PartsSourceB SUPPLIER PartsSourceB SUPPLIER SUPPLIER_ID PartsSourceB SUPPLIER SUPPLIER_NAME PartsSourceB SUPPLIER SUPPLIER_STATUS PartsSourceB SUPPLIER SUPPLIER_CITY V E PartsSourceA SUPPLIER_PARTS PartsSourceA SUPPLIER_PARTS SUPPLIER_ID PartsSourceA SUPPLIER_PARTS PART_ID PartsSourceA SUPPLIER_PARTS QUANTITY PartsSourceA SUPPLIER_PARTS SHIPPER_ID vV PartsSourceB SUPPLIER A PartsSourceB SUPPLIER SUPPLIER_ID EY PartsSourceB SUPPLIER SUPPLIER_NAME PartsSourceB SUPPLIER SUPPLIER_STATUS PartsSourceB SUPPLIER SUPPLIER_CITY Cancel Figure 4 14 Editing String Property The two tabs at the top Tree View and SQL View show the current contents of the criteria you have built The Criteria Editor at the bottom allows you to build a criteria clause To build a criteria clause you must add information to the left side of the predicate select a comparison operator and add a value to the right side
195. shown below Chapter 7 Testing Your Mode Is Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Create Data Source Create Data Source All inputs are valid Select Anish to create data source Teiid Server mm localhost 31443 Name BooksDBz2 Connection Source Use Model Connection Info Model Use Connection Profile Info Connection Profile BooksDB2 Connection Properties Name Value password KEREKEK user name 7 books connection url jdbe db2 fdbOOO255 org mydbs com 50000 driver class 3 com ibm db jcc DB2Driver Figure 7 9 Create Data Source Dialog You can either select and existing Connection Profile from the drop down list Use Connection Profile Info option or check the Use Model Info option and select an existing Source model containing connection info After creating your new data source it should now be shown in the Data Sources folder of the corresponding T elid server 7 3 2 Execute VDB from Model Explorer If you have a Telid instance defined and connected in your Telid view you can Step 1 Right click a VDB in your Model Explorer select Modeling gt Execute VDB action This action will insure your selected VDB is deployed to Teiid create a Teiid Connection Profile specific for that VDB open the Database Development perspective and create a connection to your VDB ww a PartsProject gt E data
196. signer Ui Reference Tend Designer ProdictsEzample Frodu tsHysS OL Emi Ale Edit Refactor Nmagate Search Project Metadata Run Window Help f e E agla be we Se e O Plo vP A w 88 tl Model Explorer i m A ProductsMySOL ami gS Productvews xmi ProductvoB vdb a lz 7 LE PraductsExamale lt fi ProducteMySOL mi gt import declarations 2 ae Package Diagram T m products na Package Diagram gt E produrt info bo E produrtdata bo productsymbals gt 9 Oste Source E Product DE wdb OG ProductViews xmi b import declarations 3 fA Package Diagram Hoe we Ss oe Teiid 2 oon Y ga mms focalhost 31443 5 Package Diagram P Table Editor gt gt Data Sources _ VODs ie Problems Error Lon E SOL Results os a a k B J Ts o Fy Product DB Type query expression hera Status Operation Date Connection Profile a Succe select fror May 25 201 Transient org teiid datatools connectivity connection rofile a Misc i Cardinality ty 2 PRDOLGOS Monse Stock MULL NYSE i 1 NULL Logical Relationships 3 iPROM Oracle Stock MULL NeasdagNM 0 computer solt Materialized ii fal 4 i PROOLOOS Sybase Stock MULL MYSE i computer sort w me B Figure 10 1 Teiid Designer Perspective Layout 10 1 2 Opening a Perspective There are two ways to open a perspective Using the Open Perspective button E on the shortcut bar Choosing a persp
197. string long xssinkeger ekrim Figure 10 48 Editing Datatype Values 10 3 1 2 2 Inserting Table Rows The Insert Rows action provides an additional way to create objects in a model Insert Rows action performs the same function as Insert Sibling action but allows you to create multiple children at the same time All new rows will correspond to an object of the same type as the selected object and be located under the same parent as the selected object To Insert Rows in a table Step 1 Select a table row to insert rows after Step 2 Right click select Insert Rows action or select the Insert Rows action on the main toolbar The following dialog will be displayed insert Table Rows Insert Rows Maximum of 1000 20 rows will be inserted Number of Rows 200 Figure 10 49 Editing String Property Step 3 Edit the Number of Rows value in the dialog or use the up down buttons to change the value Step 4 Select OK in dialog The desired number of rows new model objects will be added after the original selected table row 10 3 1 3 Simple Datatypes Editor The Simple Datatype Editor provides a form based properties view of XML Schema data 179 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide New Delete Simple Datatype Editor 6 Editor kas Clear Target Namespace http www metamatrix com XMLSchema DataSets Books BookDatatypes change Datatypes in macaroni
198. t in the Target Workspace Folder field via the Browse button Click Next gt when the target is defined Step 6 The next page allows you to selected individual Web Service Operations to model The default behavior of this page selects all available operations in the tree Operations can be de selected if they are not being modeled The Selection Details editor displays static information about the operation such as the names of the input and output messages and faults thrown by the operation Chapter 3 Importers al Create Relational Model from Web Service WSDL Operations Selection Press the Finish button to finish Select the desired WSDL Operations a rit Share BSM Real Time Data Design Server ReallimeData portService Select All T Share _B5M_Real_Time_Data_Design_Server_RealTimeData_portPort eee i Share _ BSM Real Time Data Design Server RealTimeData_portBinding OnHand Deselect All N gt Selection Details OnHand Operation lid http dladbO7 Share BSM Real Time _Data_Design_Server_RealTimeData_p input message _OnHandIinput output message OnHandOutput fault names none Cancel Figure 3 35 WSDL Operations Selection Dialog Step 7 Click Finish After generation the new models can be found in the specified location in your workspace In the Model Explorer you can see the importer created the following A single p
199. ta in the enterprise information system and other information that describes the way the native enterprise information system identifies the meta object Using our example of an address book database the following represent the technical metadata we know about the ZIP code column Named Z IPCode Nine characters long A string Located in the StreetAddress table Uses SQL Query Language These bits of information describe the data and information required to access and process the data in Chapter 1 Introduction the enterprise information system 1 3 4 2 Business Metadata Business metadata represents additional information about a piece of data not necessarily related to its physical storage in the enterprise information system or data access requirements It can also represent descriptions business rules and other additional information about a piece of data Continuing with our example of the ZIP Code column in the address book database the following represents business metadata we may know about the ZIP code The first five characters represent the five ZIP code numbers the final four represent the ZIP Plus Four digits if available or OOOO if not The application used to populate this field in the database strictly enforces the integrity of the data format Although the first might seem technical it does not directly relate to the physical storage of the data It represents a business rule applied to the contents of the co
200. tamodels Relational Column PartsVirtual PartsVirtual http www metamatrix com metamodels Core ModelAnnotation A partsByColor partsByColor http www metamatrix com metamodels Relational Procedure gt G Found 10 matches PartsProject PartsSourceB xmi Figure 10 26 Search Results View The toolbar actions for the Search Results view are 1b Show Next Match Navigates down one row in the view Show Previous Match Navigates up one row in the view Remove Selected Matches Removes selected results from the view Remove All Matches Clears the view _ Search Launches the MoTeiid Designerearch Dialog P Previous Search Results Select previous search results from history You can also perform some of these actions via the right click menu 164 Chapter 10 Teiid Designer Ui Reference i Problems lt Search 3 gt db feature Name pattern Part 26 matches v ig Found 8 matches PartsProject PartsSourceA xmi A PARTID httpgebtamsuas F Show In db Next Match Ctri j 4p Previous Match Ctrit PARTS http z o Z Expand All PartsSource EY PART_WEIGH Copy Ctrl C E SUPPLIER_P 3 Remove Match Found 1 match b Eig Found 1 mate 36 Remove Selected Matches Delete gt GR Found 7 matchi ae a TA Remowe All Matches gt ar Found 10 matcl Search Again Edit a Figure 10 27 Search Results Context Menu 10 2 9 Datatype Hierarchy View To ope
201. the Description View click Views gt Show View gt Other to Description view and hit OK 159 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide C Properties Descriptior PRODUCTDATA table contains various stock attribute values including basic name primary business type etc Primary key ks PK_PD_INSTR_ID Figure 10 19 Description View You can click the edit description action in the toolbar or right click select Edit in the context menu to bring up the Edit Description dialog edit actions E Properties KO PRODUCTDATA table contains warious stock attribute walues including basic name primary business type etc Primary key ks PK_PD_INSTR_ID Copy Select All A Find Bf Edit Ek Clear Input Methods BaseTable Products PRODUCTOATA Figure 10 20 Description View Context Menu 160 Chapter 10 Teiid Designer Ui Reference Edit Description for PRODUCTDATA Description PRODUCTOATA table contains various stock attribute values including basic name primary business type etc Primary key ks PK_PD_INSTR_ID Cancel Figure 10 21 Edit Description Dialog 10 2 6 Editors Editors are the Ul components designed to assist editing your models and to maintain the state for a given model or resource in your workspace When editing a model the model will be opened in a Model Editor Editing a property value for instance will require an open editor prior to actually
202. tor Preferences 9 1 3 1 XML Document Preferences XML Mapping Diagram Settings Auto expand tree when model has fewer than 21 mapping classes Auto expand XML document tree to level 1 Hide Mapping Class Columns by Default XML Document Mapping Upper XML Recursion Limit 10 Remove Duplicate Attributes on Merge Figure 9 5 XML Document Preferences Panel 143 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide 9 1 3 2 Table Editor Preferences information content for each model object type Editor XML Document Mapping Settings Transformation Table VDB Preferences for a given table will only be present if the table editor tab for ithas been viewed After restoring defaults the table editor must be wiewed again for the default preferences to become visible Table Columns Base Tables Column Visible Columns Location Foreign Keys Name Function Parameters Name In Source Inputs Native Type Interfaces Length Operations Length Axed Outputs Numeric Precision Primary Keys Numeric Scale Procedures Nullable ile Down Procedure Parameters Auto Incremented Procedure Results Default Value Return Parameters Minimum Value Sample Messages Maximum Value Scalar Functions Format Schemas Character Set Name Views Collation Name Restore Defaults Apply Figure 9 6 Table Editor Preferences Panel 9 1 3 3 Transformati
203. ttings accordingly 45 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Parsed Column Data The following list contains the parsed column data from the selected line Parsed Column Data lastName Glore ArstName Diodie MiddleName Vojvoda Empld 9000060 Department G AnnualSalary 71000 Title Associate HomePhone 480 650 9750 Morld 9000073 Street 127 State St City Los Angeles State CA ZipCode 10005 Cancel Figure 3 15 Parse Column Data Dialog e Step 4 On the Target Models Definition page select the target folder locations where your new source and view models will be created In the case of the view model you can also select an existing model for your new view tables In this case the Update Existing Model option will be selected Press Finish gt to generate your models and finish the wizard Chapter 3 Importers Import Teiid Metadata From File Target Models Definition Press Anish to complete Source Model Definitior Location EmployeesProject EmployeesData xmi View Model Definitior Location EmployeesProject Update Existing Model Figure 3 16 Select Database Options Dialog When your import is finished your source model will be opened in an editor and show a diagram containing the three generated flat file procedures ta Package Diagram Table Editor Figure 3 17 Generated Flat File Procedures In addition the view model will be opened in an edit
204. validate your models whenever the user Saves Note the Models gt Validate Automatically option must be checked When editing models the editor tabs will display a to indicate that the model has unsaved changes Testing Your Models Designing and working with data is often much easier when you can see the information you re working with The Telid Designer s Preview Data feature makes this possible and allows you to instantly preview the information described by any object whether it s a physical table or a virtual view In other words you can test the views with actual data by simply selecting the table view procedure or XML document The preview functionality insures that data access behavior in the Telid Designer will reliably match when the VDB is deployed to the Server Previewing information is a fast and easy way to sample the data Of course to run more complicated queries like what your application likely uses simply execute the VDB in the Teiid Designer and type in any query or SQL statement After creating your models you can test them by using the Preview Data action R By selecting a desired table object and executing the action the results of a simple query will be displayed in the Data Tools SQL Results view This action is accessible throughout the Teiid Designer in various view toolbars and context menus Previewable objects include Relational table or view including tables involving access patterns Relational
205. ve 10 1 3 Further information 10 2 Telid Designer Views 10 2 1 Model Explorer View 10 2 1 1 Selection Based Action Menus 10 2 2 Outline View 10 2 2 1 Outline Tree View 10 2 2 2 Outline Thumbnail View 10 2 3 T eiid View 10 2 4 Properties View 10 2 5 Description View 10 2 6 Editors 10 2 7 Problems View 10 2 7 1 Toolbar Menu 10 2 7 2 Context Menu 10 2 8 Search Results View 10 2 9 Datatype Hierarchy View 10 2 10 Telid Model Classes View 10 2 11 System Catalog View 10 2 12 SQL Reserved Words View 122 122 123 123 124 124 124 125 126 126 126 127 128 129 130 134 136 136 138 140 141 142 143 143 144 144 145 145 148 148 149 151 151 151 153 154 154 154 155 158 159 161 163 163 163 164 165 166 166 167 10 3 Editors 168 10 3 1 Model Editor 169 10 3 1 1 Diagram Editor 170 10 3 1 1 1 Package Diagram 170 10 3 1 1 2 Custom Diagram 172 10 3 1 1 3 Transformation Diagram 173 10 3 1 1 4 Mapping Diagram 174 10 3 1 1 5 Mapping Transformation Diagram 175 10 3 1 2 Table Editor 175 10 3 1 2 1 Editing Properties 177 10 3 1 2 2 Inserting Table Rows 179 10 3 1 3 Simple Datatypes Editor 179 10 3 1 4 Semantic Editor 180 10 3 1 5 Source Editor 180 10 3 1 6 Model Object Editors 180 10 3 2 VDB Editor 180 10 3 2 1 Editing Data Roles 182 10 3 2 2 Editing Translator Overrides 183 10 4 Telid Designer Main Menu 184 10 4 1 File Menu 185 10 4 2 Edit Menu 187 10 4 3 Refactor M
206. w the selected object and its SQL in a Model Editor you can click the Edit button An editor will be opened if not already open If an editor is open its tab will be selected In addition the Transformation Editor will be opened and you can perform Find Replace Ctrl F actions to highlight your original searched text string and edit your SQL if you wish 8 4 Search Models Via Metadata Properties The Telid Designer provides a search capability to find model objects that are characterized by one or more metadata property values To search your models using metadata Step 1 Select Search gt Metadata action on the main Telid Designer toolbar which opens the Search dialog 138 Chapter 8 Searching Object Type Any O Object Class Data Type Any O Simple Type Include subtypes O Runtime Type bigdecimal pe Where Contains Does NOT Contain Exact Match Search Text case insensitive any string any character part Scope Workspace O Selected resources Customize Figure 8 7 Metadata Search Dialog Step 2 Specify desired search options for Object Type Data Type and Properties 5 Step 3 Click Search The search will be performed and the results will be displayed in the 139 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Chapter 9 User Preferences The Telid Designer provides options or preferences which enable customization of various modeling an
207. what to do if it encounters more results for the query than the count limit before it reaches the limit condition 97 Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide The Telid Designer Server will evaluate this condition each time it recursively performs this query If this criteria clause evaluates false the Telid Designer Server performs the query recursively again unless it has reached the Count Limit If the criteria evaluates true the T eiid Designer Server performs the mapping for the current level and ends its recursive loop When you have created the criteria it displays in the Limit Condition box When the Teiid Designer Server dynamically populates your XML documents at runtime it will use the recursion specifications you entered here 4 2 5 Operation Editor Editing of Web Service Operation transformations is simplified via the Operation Editor When editing a Web Service model an additional editor tab labeled Operation Editor is available This editor shown below is comprised of Operations section showing a tree view of Interfaces and Operations contained within the Web Service model Input Variables section providing editing of desired Input Variable declarations Procedure section providing SQL editing of the procedure F BooksXML xmi Operations Input Variables v bookCollection The variables representing values from the request document that are available to the selected operation s proce
208. xmi w import declarations 4 4 jPartsProject Parts Sources xmi a PartsProject PartsSourceB xmi 4 http www w3 orga 200LXMLSchema 4_ PartsProject SampleViews xmi ta Package Diagram gt H Supplierinfo Figure 10 9 Show Model Imports Action 10 2 1 1 Selection Based Action Menus Selecting specific objects in the Model Explorer provides a context from which the T elid Designer presents a customized menu of available actions Selecting a view model for instance results in a number of high level options to manage edit model content perform various operations and provides quick access to other important actions available in Telid Designer These may include specialized actions based on model type gt PartsSourceB xmi b n z New gt z New Child E Base Table gt ES gt amp Catalog b gt F f aee O Index gt z Open With L Logical Relationship A Procedure Copy i Schema Paste Ctri amp view Paste Specie tl ta Custom Diagram r Delete a cat Teiid 33 z O Refactor gt ar H ma g Import py Export 153 Red Hat JBoss Developer Studio 4 1 Teiid Designer User Guide Figure 10 10 Sample Context Menu 10 2 2 Outline View The Outline View is a utility view which provides both at tree view dedicated to a specific model open in an editor and a scaled thumbnail diagram representative of the diagram open in the corresponding Diagram Edito
209. xt and conversely select Hide Text to only show icons To quickly switch between open perspectives select the desired perspective button Notice that the set of views is different for each of the perspectives A I Teiid Desig is Database D Figure 10 5 Workbench Window Title Bar 150 Chapter 10 Teiid Designer Ui Reference 10 1 3 Further information 10 2 Telid Designer Views Views are dockable windows which present data from your models or your modeling session in various workspace selection This section summarizes most of the views used and available in Telid Designer The full list is presented in the main menu s Window gt Show View gt Other dialog under the Teiid Designer category Show View gt E Team lt v Teiid Designer fs Datatypes Description w Metadata Favorites la Model Explorer aH Relationship Nawigator at System Catalog Tags nae Teiid Wh Teiid Model Classes Cancel Figure 10 6 Eclipse Show View Dialog 10 2 1 Model Explorer View Telid Designer allows you manage multiple projects containing multiple models and any corresponding or dependent resources The Model Explorer provides a simple file structured view of these resources The Model Explorer shown below is comprised of a toolbar and a tree view 151 Red Hat JBoss Developer Studio 4 1 Telid Designer User Guide E n Outline 2 e La AllCustemerAccounts
210. y State Kisselmeyer Abbiegale Tikvica 9000059 G6 64000 00 MGMT WannaBe 670 270 7947 9000073 123 State St Glore Diodie Vojvoda 9000060 G 71000 Associate 480 650 9750 9000073 127 State St Los Angeles CA 10 Dawson Pinckney Ostoja 9000061 G6 71000 Associate 110 400 3600 9000073 135 State St Detroit MI 1001 Waldrip Trixie Curic 9000062 6 57000 Newbie 820 210 7045 9000073 136 State St Albany NY 10014 Use header for column names Header line number 1 Line number of first data row 2 Columns Format Fixed Width Options Character delimited 0 Axed width Number of columns 10 Delimeter Options Column Information Comma olumn Name Datatype El LastName string E ArstName string Tab EV MiddleName string EY Empld 7 string EJ Department string O Space O Semicolon Bar EJ AnnualSalary string O Other string fe ee LA Tarne Ph DE i String Teiid TEXTTABLE Function Options Include HEADER Include SKIP Include QUOTE i Include ESCAPE k c Figure 3 14 Teiid Data File Parser Settings Step 3b To aid in determining if your parser settings are correct you can select a data row in your File Contents Preview section and click the Parse Selected Row button A dialog will be displayed showing the list of columns and the resulting column data If your column data is not what you expected you ll need to adjust your se

Download Pdf Manuals

image

Related Search

Related Contents

Palsonic TFTV935S User's Manual  CISIS Formatting Language  Hewlett Packard Enterprise ProLiant DL180 G6  セパレート2ウェイ スピーカー 車種適合表 主な特長  ARCTIC Accelero S1 Rev 2  MANUAL DE INSTRUCCIONES para los plotters de corte Secabo  Add-On Computer Peripherals (ACP) SFPP Twinax 5m  1 - Sony Asia Pacific  ICC IC107BFGWH  

Copyright © All rights reserved.
Failed to retrieve file