JBoss.orgCommunity Documentation

Teiid Designer User Guide

7.1.0

Legal Notice

1. Introduction
1.1. What is Teiid Designer?
1.2. Why Use Teiid Designer?
1.3. Metadata Overview
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.5. Design-Time and Runtime Metadata
1.3.6. Source and View Metadata
1.4. Models 101
1.4.1. What Are Models
1.4.2. How is a Model Defined?
1.4.3. Model Classes and Types
1.4.4. Models and VDBs
1.4.5. Models and Connection Profiles
1.4.6. Model Validation
1.4.7. Testing Your Models
2. Teiid Designer Perspectives
2.1. Teiid Designer Perspective
2.2. Opening a Perspective
2.3. Further information
3. Teiid Designer Main Menu
3.1. File Menu
3.2. Edit Menu
3.3. Refactor Menu
3.4. Navigate Menu
3.5. Search Menu
3.6. Project Menu
3.7. Metadata Menu
3.8. Run Menu
3.9. Window Menu
3.10. Help Menu
4. Teiid Designer Views
4.1. Model Explorer View
4.1.1. Selection-Based Action Menus
4.2. Outline View
4.2.1. Outline Tree View
4.2.2. Outline Thumbnail View
4.3. Teiid View
4.4. Properties View
4.5. Description View
4.6. Editors
4.7. Problems View
4.7.1. Toolbar Menu
4.7.2. Context Menu
4.8. Message Log View
4.9. Search Results View
4.10. Datatype Hierarchy View
4.11. Teiid Model Classes View
4.12. System Catalog View
5. Editors
5.1. Model Editor
5.1.1. Diagram Editor
5.1.2. Table Editor
5.1.3. Simple Datatypes Editor
5.1.4. Semantic Editor
5.1.5. Source Editor
5.1.6. Model Object Editors
5.2. VDB Editor
5.2.1. Editing Data Roles
6. Importers
6.1. Import DDL into Relational Model
6.2. Import From JDBC
6.3. Import Metadata From Text File
6.3.1. Import Relational Tables Text Importer
6.3.2. Import Relational Virtual Tables Text Importer
6.3.3. Import Relationships Text Importer
6.3.4. Import Datatypes Text Importer
6.4. Import WSDL into Relational Source Model
6.5. Import WSDL Into Web Service
6.5.1. Import WSDL From Workspace Location
6.5.2. Import WSDL From File System Location
6.5.3. Import WSDL From URL
6.6. XSD Schema File
7. New Model Wizards
7.1. Creating New Relational Source Model
7.1.1. Copy From Existing Model
7.1.2. Generate From Existing UML Model
7.2. Creating New Relational View Model
7.2.1. Copy From Existing Model
7.2.2. Transform From Existing Model
7.2.3. Generate From Existing UML Model
7.2.4. Create From XML Schema
7.3. Creating XML Document View Model
7.3.1. Copy From Existing Model
7.3.2. Build XML Documents From XML Schema
7.4. Creating XML Schema Model
7.4.1. Copy From Existing Model
7.5. Creating Web Service View Model
7.5.1. Copy From Existing Model
7.5.2. Build From Existing WSDL File(s) or URL
7.5.3. Build From Relational Models
7.5.4. Build From XML Document View Models
7.6. Creating New Extensions Model
7.6.1. Copy From Existing Model
7.7. Creating New Relationship Model
7.7.1. Copy From Existing Model
7.8. Creating New UML 2.0 Model
7.8.1. Copy From Existing Model
8. Creating and Editing Model Objects
8.1. Creating New Model Objects
8.1.1. New Child Action
8.1.2. New Sibling Action
8.1.3. New Association Action
8.2. Model Object Editors
8.2.1. Transformation Editor
8.2.2. Input Set Editor (XML)
8.2.3. Choice Editor (XML)
8.2.4. Recursion Editor (XML)
8.2.5. Operation Editor
9. Editing Models and Projects
9.1. Rename A Model
9.2. Move Model
9.3. Save Copy of Model
9.4. Clone Project
10. Testing Your Models
10.1. Manage Connection Profiles
10.2. Previewing Data For a Model
10.2.1. Preview Relational Table or View
10.2.2. Preview Relational Table With Access Pattern
10.2.3. Preview Relational Procedure
10.2.4. Preview Web Service Operation
10.2.5. Sample SQL Results for Preview Data
10.3. Testing With Your VDB
10.3.1. Creating Data Sources
10.3.2. Execute VDB from Model Explorer
10.3.3. Deploy VDB from Model Explorer
10.3.4. Executing a Deployed VDB
11. Searching
11.1. Finding Model Objects
11.2. Search Models Via Relationship Properties
11.3. Search Transformation SQL
11.4. Search Models Via Metadata Properties
12. Relationships
12.1. Creating Relationships
12.2. Creating your own Relationship Type
12.3. Relationship Navigator
13. User Preferences
13.1. Teiid Designer Preferences
13.1.1. Diagram Preferences
13.1.2. Diagram Printing Preferences
13.1.3. Editor Preferences
13.1.4. Validation Preferences

The Teiid Designer User's Guide provides detailed descriptions of Teiid Designer features and functionality.

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:

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:

Metadata can include different types of information about a piece of data.

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 “view” metadata that indicate what the metadata represents. For more information, see Source and View Metadata.

Teiid Designer software distinguishes between design-time metadata and run-time metadata. This distinction becomes important if you use the Teiid 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.

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. For more information, see Modeling Your Teiid Designer Information Systems.

View Metadata, 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. For more information, see Modeling Your Teiid Designer Data Needs.

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:

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 Teiid 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 8.2.1, “Transformation Editor”.”

Section on Modeling transformations.

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


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 Teiid 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 ). Teiid 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.


In addition to source models, Teiid Designer provides the ability to define a variety of view models(represented by ). These can 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 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

  • Relationships

  • Functions

  • UML 2.0

For full list of supported model types see Chapter 7, New Model Wizards

A third model type, logical, provides the ability to define models from a logical or structural perspective.

Teiid Designer utilizes Eclipse's Workbench environment which controls visual layout via perspectives. A 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.

The Teiid Designer perspective provides access to fundamental model editing and management capabilities. This perspective includes 5 main UI components or groups of components as shown below. They include:


There are 8 categories of actions on Teiid Designer's main menu bar.


The File menu provides actions to manage your workspace resources.


The New > sub-menu provides specific actions to create various generic workspace resources as well as Teiid Designer models and VDBs.


  • The File menu contains the following actions:

    • New > Model Project - Create user a new model project.

    • New > Folder - Create new folder within an existing project or folder.

    • New > Model - Create a new model of a specified model type and class using the Chapter 7, New Model Wizards.

    • New > 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 (Ctrl+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.

    • Save (Ctrl+S) - Saves the contents of the active editor.

    • Save As - Enables you to save the contents of the active editor under another file name or location.

    • Save All (Shift+Ctrl+S) - Saves the contents of all open editors.

    • Move… - Launches a Refactor > Move resource dialog..

    • Rename… (F2) - Launches a Refactor > 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 delimiter again - you do not need to save the file.

    • Print (Ctrl+P) - Prints the contents of the active editor. In the Teiid 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 to a 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..

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

The Edit menu provides actions to manage the content, structure and properties of your model and project resources.


  • The Edit menu contains the following actions:

    • New > Child - This menu is created dynamically to support the creation of whatever types of child objects can be created under the selected object.

    • New > 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 > Association - This menu is created dynamically to support the creation of whatever types of associations can be created with the selected object.

    • Modeling > - 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.

    • Redo - Reapplies the most recently undone command.

    • Cut - Deletes the selected object(s) and copies it to the clipboard.

    • Copy - Copies the selected object(s) to the clipboard.

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

The Search menu presents several specific search options.


Teiid Designer contributes a sub-menu (i.e. Teiid Designer > ) to the main search menu, as shown above.


The Metadata menu provides Teiid Designer-specific actions.


Views are dockable windows which present data from your models or your modeling session in various forms. Some views support particular Chapter 5, Editors and their content is dependent on workspace selection. This section summarizes most of the views used and available in Teiid Designer.

Below is a short summary of Teiid Designer views. The full list is presented in the main menu's View > Show View dialog.

Designer


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


The toolbar consists of nine common actions:

  • Preview Data - Executes a simple preview query (SELECT * FROM ).

  • Sort Model Contents - Sorts the contents of the models based on object type and alphabetizing.

  • 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)

  • 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:


If Show Model Imports is checked, the imports will be displayed directly under a model resource as shown below.


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 > Show View > Other..." to display the Show View dialog. Choose "Teiid Designer > Teiid" view and hit OK.


To create a new Teiid instance, either right-click select New Teiid Instance action or click the same action button, , in the toolbar.

You'll get the New Teiid Instance dialog shown below.


The dialog contains two panels of input. The top panel, Teiid Admin Connection Info, pertains to the connection information required to connect to the admin URL of your installed Teiid 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 second 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

  • Teiid Server Properties - View and edit properties of an existing Teiid instance

  • Reconnect - Reconnect and refresh contents of the selected Teiid instance

  • Delete - Disconnect and delete the selected Teiid instance

  • Execute VDB - Creates a JDBC Teiid connection profile and opens the Data Tools Database Development perspective

  • Undeploy VDB - Removes the selected VDB from the Teiid instance

  • Create Data Source - Launches the New Data Source wizard

  • Delete Data Source - Removes the selected Data Source from the Teiid instance

Editors are the UI 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 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 Teiid 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.


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.


The Teiid 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, 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 Service View 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.

The Problems View displays validation errors, warnings, or information associated with a resource contained in open projects within your workspace.


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 > Show View > Other > Teiid Designer > 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 , or info ).

  2. Resource - The name of the resource.

  3. Path - The project name.

  4. Location - The object within the resource that has a validation error.

  5. type - Type of validation item.

Editors are the UI 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 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 Teiid 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.


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.


The Teiid 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, 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 Service View 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.

The Model Editor is comprised of sub-editors which provide multiple views of your data. The Diagram Editor provides a graphical while the Table Editor provides spreadsheet-like editing capabilities. This section describes these various sub-editors.

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:

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.


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.


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

  • Refresh Table - Refreshes the contents of the current Table Editor to insure it is in sync with the model.


A VDB, or virtual database is a container for components used to integrate data from multiple data 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 Description area, a Models area, an Other Files panel and a VDB Data Roles panel.


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


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 > Import action or select a project, folder or model in the tree and right-click choose "Import..."


During the Finish processing, a monitor will be displayed providing feedback on the import progress.


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

In the Model Explorer you can see the importer created the following:


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 procedure, and extracts the results from the response.

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.

Detailed steps for each of these options is described below, as well as a description of how the wizard handles WSDL errors.

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.


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.


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.


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.

Use one of the following options to launch the New Model Wizard.

New Model Wizard

Note

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.


Create New Relational Source Model

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 relational source model, the following builder options are available:

    • Copy from existing model of the same model class.

    • Generate from existing UML models.

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.

In the Teiid Designer you can also turn your existing UML models into relational source or view models using the steps below. Note that one option of this builder is to generate relationships between the UML constructs and their generated Relational counterparts.

Create New Relational View Model

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 relational view model, the following builder options are available:

    • Copy from existing model of the same model class.

    • Transform from existing model.

    • Generate from existing UML models.

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.

Create XML Document View Model

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 document view model, the following builder options are available:

    • Copy from existing model of the same model class.

    • Build XML documents from XML schema.

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.

This option creates an XML View document model based on a selected XML schema and its dependencies.

Create XML Schema Model

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:

    • Copy from existing model of the same model class.

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.

Create Web Service View Model

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 web service view model, the following builder options are available:

    • Copy from existing model of the same model class.

    • Build from existing WSDL file(s) or URL.

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.

Create New Extensions Model

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 extensions model, the following builder option is available:

    • Copy from existing model of the same model class.

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.

Create New Relationship Model

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 relationship model, the following builder option is available:

    • Copy from existing model of the same model class.

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.

Create New UML 2.0 Model

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 uml model, the following builder option is available:

    • Copy from existing model of the same model class.

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.

This section summarizes Teiid Designer features for creating and editing existing model objects contained in your models.

As discussed in the introduction, Section 1.3.3, “Metadata Models” provide a framework to model various types of metadata. 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 in a stored procedure, nor can you create a mapping class column in a Web service operation's output message.

The Teiid Designer provides a common set of actions to create new children of these models as well as children of children.

  • To create new associations between model objects in the Section 5.1.1, “Diagram Editor”:

    • 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 > Foreign Key Relationship..

    • 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

    • Step 1 - Select a column in table.

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

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

  • To create new associations between model objects in the Section 5.1.2, “Table Editor”:

    • 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 > Foreign Key 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.

The primary actions for editing model objects are:

These actions are presented in Teiid Designer's main Edit menu and also in the right-click context menus for model objects selected in the Section 4.1, “Model Explorer View”, Section 5.1.1, “Diagram Editor” and Section 5.1.2, “Table Editor”.

Modeling Sub-Menu

In addition to the New Child/Sibling/Association menus available for object creation Designer provides a Modeling > 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:


If a view table is selected, the menu would reflect the actions related to virtual operations:


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.

The Teiid Designer's Transformation Editor enables you to create the query transformations that describe how to derive your virtual metadata information from physical 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:

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


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 information, see Section 13.1.3.3, “Transformation Editor Preferences”

  • The Transformation Editor toolbar actions are summarized below.

    • Prevew Virtual Data - executes a simple preview query for the target table or procedure of the transformation being edited.

    • Search Transformations - provides a simple way select and edit another transformation based SQL text search criteria.

    • Edit Transformation - provides a simple way to change which transformation to edit without searching in a diagram or the Model Explorer. Simply click the action and select from a list of views, tables, procedures or operations from the currently edited model.

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

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

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

    • 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 names will be fully-qualified.

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

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

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.

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:

If you join a criterion to the 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.

The Transformation Editor’s Expression Builder offers you a quick, graphical means to build expressions in your transformations. This Expression Builder lets you create:

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 Teiid Designer Server for data access, your applications cannot directly query an Input Set. Input Sets only display in the XML transformation diagram to which they belong. Input Sets do not display on the Section 4.1, “Model Explorer View” view and you cannot use them as you would a normal class, such as for source classes in other 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)



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 use the Input Set Parameters within a mapping class transformation to produce mapping attributes you can map to your XML document.

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.



The table on this panel displays fragment options for the choice, each represented by the top node of the document fragment.

The Summary tab, shown below, displays a SQL-like version of the current choice criteria.


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, Illustrative Brokerage, and FinancialPartners.com. The partners created the schema broadly, 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 Teiid 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 Teiid 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, Teiid Designer will retain the criteria if you want to include the option in the future.

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:

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 Teiid Designer Server. To take advantage of this behavior, you must open the Recursion Editor in the recursive mapping class Section 5.1.1.5, “Mapping Transformation Diagram”, mark the transformation query as recursive, and specify the recursion limit properties.

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 of times the elements are nested within the document.

You can set the following conditions to limit the recursion:

To open the Recursion Editor, click on the Recursion Editor button on the displayed mapping class.



Note

The Teiid Designer Server will evaluate this condition each time it recursively performs this query. If this criteria clause evaluates false, the Teiid Designer Server performs the query recursively again unless it has reached the Count Limit. If the criteria evaluates true, the Teiid 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.

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:


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 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:


Teiid Designer offers three basic model edit actions: Rename, Move and Save As... and one project-related action, Clone Project. These actions are described below.

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.

As described briefly in Chapter 1, you can test your models in Teiid Designer by using the Preview Data action 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.

Designing and working with data is often much easier when you can see the information you're working with. 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 . By selecting a desired table object and executing the action, the results of a simple query will be displayed in the Section 10.2.5, “Sample SQL Results for Preview Data” view. This action is accessible throughout the Teiid 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 reference sufficient connection info. (See Section 4.3, “Teiid View” view)

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.

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


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


Testing Your Transformations

When editing transformation SQL in the Transformation Editor, a special SQL Results data action is provided in the editor tool-bar .

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.

In Teiid Designer you can execute a VDB to test/query actual data.

The requirements for VDB execution are:

Teiid 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 Teiid Connection Profile, opens the Database Development perspective and creates a connection to your VDB.

Designer provides multiple search actions located via Teiid Designer sub-menu in Eclipses Search menu. Search menu.


Introduction

The Teiid Designer includes the ability to create named relationships between almost any two or more modeling elements.

The Relationship metamodel is one way to define arbitrary associations between two or more metadata entities. Using the Relationship metamodel, the Teiid Designer provides users the ability to view, add, and edit associations between metadata entities.

But the Generic Relationships functionality can define relationships between metadata entities from different metamodels. For example, it is possible to create a generalized relationship between a Relational Column and a UML Package.

Users can even define their own Section 12.2, “Creating your own Relationship Type” that constrain the numbers and types (metaclasses) of objects that can be related.

Once the existing relationships are defined, the Teiid Designer provides a number of mechanisms that will make use of those relationships. This includes navigating to a related object, searching for relationships based on some criteria, or diagramming the relationship of various sets of objects

To create a relationship from the Section 4.1, “Model Explorer View” tree, select two or more objects in the tree, right-click select New Association > Relationship action and follow Steps 3 through 8 described above.


A Relationship Navigator view provides a unique way of viewing and navigating your relationships. It can be very useful in understanding associations between complex and visibly unrelated data.

To open the Relationship Navigator you can select the Window > Show View > Relationship Navigator action (if available) or open the Show View dialog via Window > Show View > Other... and open the Teiid Designer folder and select Relationship Navigator .

You can also quick-launch the navigator by selecting any object in the Section 4.1, “Model Explorer View” or a Model Editor and right-click select the Modeling > Open in Relationship Navigator action.

In the example presented here, the diagram below illustrates the standard role-based relationships defined for a family.


This action opens the Relationship Navigator in the same panel as the Properties and Description views.


The visible detail in the navigator is limited in order to simply navigation. You can, however, show detailed information about the navigation/relationship nodes by hovering your mouse and showing tooltips.


At the center of the navigator is the focused node, which represents the base or frame of reference for the displayed navigation. In this sample above, George has a wife, a niece and 5 sons. The relationship diagram shown below illustrates the role based view of these same relationships.

You can navigate to through your relationships by double-clicking an end-node in one of the relationships. For instance, double-click the Son Ron in the upper end-node and the navigator now focuses on Ron and his relationships. You can also right-click and select the Follow Relationships action.


As you navigate, a blue ball will animate the direction of the relationship flow first too the focused object then into the end of the relationship containing the initial focused object.

The navigator also provides toolbar and right-click menu actions to perform various functions in the navigator.

The Teiid Designer provides options or preferences which enable customization of various modeling and UI behaviors. Preferences can be accessed via the Edit > Preferences action on the Main toolbar.


General Teiid Designer preferences include.