Create new JBoss Tools Documentation Jira issue

This will launch the Jboss Tools Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

Teiid Designer User Guide

3.2.0.Beta

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 Connectors
1.4.6. Model Validation
1.4.7. Testing Your Models
2. Teiid Designer Perspectives
2.1. Teiid Designer Perspective
2.2. SQL Explorer Perspective
3. Teiid Designer Main Menu
3.1. File Menu
3.2. Edit Menu
3.3. Refactor Menu
3.4. Search Menu
3.5. Project Menu
3.6. Metadata Menu
3.7. Window Menu
3.8. 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. UDFs View
4.4. Connectors View
4.5. Properties View
4.6. Description View
4.7. Editors
4.8. Problems View
4.8.1. Toolbar Items
4.8.2. Context Menu
4.9. Message Log View
4.10. Preview Results View
4.11. Search Results View
4.12. Datatype Hierarchy View
4.13. Model Classes View
4.14. System Catalog View
4.15. Database Structure View
4.16. SQL History View
4.17. Connections View
4.18. SQL Editor View
4.19. SQL Results 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. Overview
5.2.2. Problems
5.2.3. Indexes
5.2.4. User Files
5.2.5. Web Services
5.2.6. Execute
6. Importers
6.1. Import Archive File
6.2. Import From File System
6.3. Import From JDBC
6.4. Import Metadata From Text File
6.4.1. Import Relational Tables Text Importer
6.4.2. Import Relational Virtual Tables Text Importer
6.4.3. Import Relationships Text Importer
6.4.4. Import Datatypes Text Importer
6.5. Import WSDL as Relational Source
6.6. Import WSDL Into Web Service
6.6.1. Import WSDL From Workspace Location
6.6.2. Import WSDL From File System Location
6.6.3. Import WSDL From URL
6.7. XML Schema as Relational Source
6.8. XSD Schema File
6.9. Import Rational Rose Model
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 New XML Service Source Model
7.3.1. Copy From Existing Model
7.4. Creating New XML Service View Model
7.4.1. Copy From Existing Model
7.5. Creating XML Document View Model
7.5.1. Copy From Existing Model
7.5.2. Build XML Documents From XML Schema
7.6. Creating XML Schema Model
7.6.1. Copy From Existing Model
7.7. Creating Web Service View Model
7.7.1. Copy From Existing Model
7.7.2. Build From Existing WSDL File(s) or URL
7.7.3. Build From Relational Models
7.7.4. Build From XML Document View Models
7.8. Creating New Extensions Model
7.8.1. Copy From Existing Model
7.9. Creating New Relationship Model
7.9.1. Copy From Existing Model
7.10. Creating New UML 2.0 Model
7.10.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 Connectors
10.1.1. Manage Connectors
10.1.2. Create New Connector
10.1.3. Binding Sources to Connectors
10.1.4. Importing Connectors and Types
10.1.5. Export Connectors
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.3. Testing With Your 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
13.1.5. XML Schema Source Preferences
13.2. SQL Explorer Preferences
13.2.1. SQL Editor Preferences

Go To: Table of Contents

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

  • XML Service

  • Web services

  • Relationships

  • Functions

  • UML 2.0

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

Teiid Designer can be used to model a variety of classes of models. Each of these represent a conceptually different classification of models.

VDBs contain two primary varieties of model types - source and view. Source models represent the structure and characteristics of physical data sources, whereas view models represent the structure and characteristics of abstract structures you want to expose to your applications.

Designing and working with data is often much easier when you can see the information you're working with. The Teiid 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 leverages an embedded version of the Teiid Designer Server, so you can be sure that the behavior in the Teiid 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 . By selecting a desired table object and executing the action, the results of a simple query will be displayed in the Preview results 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 several previewable model object types and all source models within the model dependency tree must be bound to connectors.

Previewable objects include:

  • Relational table or view, including tables involving access patterns.

  • Relational procedure.

  • Web Service operation.

  • XML Document staging table.

Note that any virtual table, view or procedure is previewable as long as all "physical" source models are bound via connectors. (See Connectors view and Manage Connectors)

Note

If attempting to preview a relational access patter, a web service operation or a relational procedure with input parameters, a dialog will be presented to request values for required parameters.

Go To: Table of Contents

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.

Teiid Designer perspectives include:

  • Teiid Designer - Default perspective providing fundamental model editing and management capability.

  • SQL Explorer - Provides views and actions to perform tests on your VDB by connecting to your data sources and executing your test queries.

For more details on perspectives, views and other Eclipse workbench details, see formal Eclipse Documentation.

Opening a Perspective

There are two ways to open a perspective:

The Teiid Designer perspective is now displayed.

There are few additional features of perspectives to take note of.

Go To: Table of Contents

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

  • These categories include:

    • File - Resource management actions.

    • Edit - Standard edit actions including undo/redo.

    • Refactor - Resource actions (i.e. Rename, Move, etc...).

    • Search - Find data within your workspace.

    • Project - Model level actions.

    • Metadata - Custom metadata-related actions.

    • Window - Change perspectives or add/remove views to your perspective.

    • Help - Access available Teiid Designer help documents, Teiid Designer SQL Support Guide and Eclipse Overview information.


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 New Model Wizard.

    • New > Virtual Database Definition - Create a new VDB, or Virtual Database Definition.

    • Add Existing Project... - Add an existing Teiid Designer project into your workspace.

    • Add Existing Model Project Set... - Import an existing Model Project Set from your file system. A Model Project Setan be exported via the Export action.

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

    • Revert - Replaces the contents of the active editor with the previously saved contents. Currently not implemented for Teiid Designer models or VDBs.

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

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


Go To: Table of Contents

Teiid Designer provides various views to display and allow editing of models and model content. This section describes each view in detail.

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.


User Defined Functions extend the basic set of functions you can use within data access applications that use Teiid Designer or even within your transformation queries that you use to model View Metadata. Your organization needs to develop Java logic to perform these functions and manage these functions through the Teiid Designer Console. For more information about this complete process, see Creating Custom User-Defined Functions.

Before you can model the user-defined functions, you must have exported the User Defined Functions metadata model from Teiid Designer using the Teiid Designer Console. You should have placed this file in your local directory so that you can open it.

The User Defined Functions model uses a special metamodel, the Function metamodel, which is limited to constructs for this specific purpose. Therefore you cannot create a new model using this metamodel, nor should you use this model in a project or as a source for View Metadata models.

Users can edit their User Defined Functions model from within the UDFs view shown below. The basic functionality of the UDFs view is identical to the Model Explorer view but focused the single FunctionsDefinitions model.


The view's toolbar actions include:

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

  • Import UDF Extension Jar -Import your custom UDF extension jar files.

  • Add Connector Jar to UDF - Add connector jar to UDF model. This allows using dual use extension jars.

  • Collapse All - Collapses the tree view.

  • Link with Editor - When object is selected in an open editor, this option auto-selects and reveals object in Model Explorer.

You can delete your UDF jars by right-click select Delete Jars action.


Both UDF jars and connector extension jars are utilized by Teiid Designer during VDB execution and data Preview. This provides the ability to utilize a common extension jar to deliver both user defined function code and custom connector code. To facilitate this scenerio, the UDFs view contains an Add Connector Jar to UDF action.

To add an existing connector jar to your UDF:

Step 1: Select the Add Connector Jar to UDF toolbar button or select the UDF jars folder or jar and right-click select the same action.

Step 2 : In the selection dialog below, select one or more connector jars and choose OK to finish.


The Connectors View provides a means to display and manage (add or remove) connectors and source bindings in Teiid Designer. For more information on Connectors, see Manage Connectors.

To show the Connectors View click Views > Show View > Other... to display the Show View dialog. Choose Teiid Designer > Connectors view and hit OK.


The view's toolbar actions include:

  • Create New Connector - Launches New Connector wizard.

  • Import Connectors - Imports connectors from a *.cdk file.

  • Export Connectors - Exports selected connectors to *.cdk file. This action provides a means to transfer your source connection information between Teiid Designer workspaces.

  • Show/Hide Connector Types - Shows or hides connector types in tree view.

  • Collapse All - Collapses the tree view.

You can also access these actions via the right-click menu as shown below. Note that the Clone connector action creates a new connector whose property values are set with those of the originally selected connector.


You can show/hide the connector types by toggling the action in the toolbar.


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

  • Semantic Editor - XML Schema models only.

  • Source Editor - XML Schema models only.

The VDB Editor contains sub-editors which provide different views of the data or parts of data within a VDB. These sub-editors include.

  • Overview - View and manage contents of VDB.

  • Problems - Display errors and warnings within VDB and models.

  • Indexes - View indexes generated for model data within VDB.

  • User Files - Manage additional VDB resources or artifacts.

  • Web Services - Define and view WSDL.

  • Execute - Create and change connectors and execute queries.

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:

  1. Severity - Indicates the severity of the line item (i.e., error , warning , or info ).

  2. Description - A description of the line item.

  3. Resource - The name of the resource.

  4. In Folder - The project name.

  5. Location - Model object within the resource that has a validation error.

Executing the Preview Data action , will result in the query results being displayed in the Preview results view, shown below.


The view's toolbar actions include:

  • Show Query Results - Shows query results in table row or XML format.

  • Show Query Plan Tree - Shows query plan in tree format.

  • Show Query Plan Document - Shows query plan in xml document format.

  • Show Debug Log - Shows debug log file contents.

  • Close the Selected Results - Removes the selected results from the view.

  • Copy Results to Clipboard - Copies selected results as text to the system clipboard.

  • Save Results to File - Provides a file dialog to save selected results to a text file on file system.

Tip

The History list can be sorted alphabetically (or reverse) by clicking the "History" column header.

Tip

The tooltip for each History object will display the underlying base SQL text used in the query.

Because the Preview Data feature is just that, a preview, you are limited to maximum number of rows returned rows. This value is a user preference and can be changed from its default value by selecting Preferences > Teiid Designer and changing the Preview Data's row count limit value.

By selecting the Show Query Plan Tree toolbar action the SQL table results are replaced with a tree view of the underlying Query plan and corresponding properties.


By selecting the Show Query Plan Document toolbar action the SQL table results are replaced with an XML document view of the underlying Query plan.


Go To: Table of Contents

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.


Editors also contain sub-editors which provide different views of the data or parts of data within a model. These sub-editors, specific to model types are listed below.

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 six editor tabs, namely:

    • Overview - Manage/edit contents, description and indicates current deployable state.

    • Problems - Table view of any validation problems your VDB may have (i.e. Warnings and/or Errors).

    • Indexes - Provides viewable summary of various Index files utilized at run-time.

    • User Files - Provides importing or attaching additional user files to the VDB archive.

    • Web Services - When VDB contains Web Services models, this tab provides access edit and view WSDL specific information.

    • Execute - Manage source model connector bindings and actually test your data.


Go To: Table of Contents

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


In addition to creating relational source models by importing your metadata (Import Relational Data ) you can also turn your WSDL into relational models.

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 addition to creating relational source models by importing your metadata you can also turn your existing XML Schema into relational source or view models. You can create XML View models using the steps below.

The Teiid Designer provides an option to an importer for files exported from Rational Rose versions 2000 and 2001.

The importer creates UML models in the workspace. Supported structural features of UML will be defined by the UMLClasses Metamodel Project. The content of the Rose model file that matches these supported features of the UML metamodel are imported.

The importer allows for subsequent re-importing of the Rose model file which will incorporate changes into the UML model. Any properties of the supported UML constructs that are unique to your use of Rose are implemented using the Teiid Designer's metadata extension functionality.

Go To: Table of Contents

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.

Note

Model names are required to be unique within Designer. When specifying model names in new model wizards and dialogs error messages will be presented and you will prevented from entering an existing name.


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.

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.

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.Table_X) for each source table. The steps are the same as for the Copy Model From Existing Model described 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.

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

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

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.

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.

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.

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.

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.

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.

Go To: Table of Contents

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

As discussed in the introduction, 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.

Teiid Designer provides specialized object editors to handle complex model objects and their unique properties. These objects include:

This section describes these editors in detail.

In addition, the primary actions for editing model objects are:

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

  • 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 Teiid Designer's main Edit menu and also in the right-click context menus for model objects selected in the Model Explorer, Diagram Editor and Table Editor.

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 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 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 created, edited, or deleted 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:


Input Variables can be deleted via right-click menu Delete action (see figure below) for selected variables or using Cntl-X, Delete keys. You can also rename an Input Variable using the right-click menu Rename action or the F2 key. ( Note: Input variables names have to be named starting with the "IN_" characters. Renaming a variable will always insure its name is prepended with "IN_").


Go To: Table of Contents

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.

Go To: Table of Contents

As described briefly in Chapter 1, you can test your models in Teiid Designer by using the Preview Data action . You can also test your models via your deployable VDB. These two options will be described in detail in this chapter as well as managing your required connectors.

In order to test your data, the Teiid Designer requires applicable connector information. This information is stored in the properties of a Connector. The Teiid Designer provides a Connectors view for managing your connectors and this section summarizes its features and capabilities.

Create a new connector by either selecting the New Connector action in the Connectors view toolbar or right-click select the same action from the context menu. If connector types are displayed in the Connectors view, you can select a connector type first, then select the New Connector action. This will pre-select the type in the New Connector dialog. The action will launch the New Connector dialog shown below. Provide a valid connector name, select desired connector type, enter your custom properties and click OK to create you new connector.


In order to preview your data, you'll need to bind your source models to valid connectors. If you import your source from JDBC, your connector will be created during the import process and your source automatically bound to that connector.

You can bind, unbind or change source bindings in a couple of ways.

To bind a source, you can:

To unbind a source:

You can import your custom connector types and connectors into Designer. These connectors can be in the form of a *.cdk file (i.e. exported from Designer) or from a *.caf (connector archive file) defined during connector development.

You can export your custom connectors from Teiid Designer into a *.cdk file.

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 Preview results 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 be bound to connectors. 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 are bound via connectors. (See Connectors view )

Testing Your Transformations

When editing transformation SQL in the Transformation Editor, a special Preview 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.

When executing queries on XML View Documents, the results are displayed in XML format as shown below:


When each query is executed, the SQL is stored in the SQL History table so the queries can be re-submitted without re-typing it.


This content of this SQL History table can be edited via right-click menu shown below.


Saving Your Query Results

Query results, both SQL and XML, can be saved to text files in the SQL Explorer perspective.

The toolbars for SQL Results and XML Results views contains an additional action/button (see below) which presents a file save dialog. Note that the action can also be accessed via the right-click menu on both views.


In addition, this file save dialog is presented to the user when the XML Document results exceed the character size limit defined by a user preference property for the SQL Explorer.


When this limit is exceeded, the user is presented with a dialog to either save the results to a file or continue displaying the results and possibly incurring substantial runtime memory allocation.


When the Save option is accepted, the XML Query Results view displays the file name and path of the exported file.


Go To: Table of Contents

The Teiid Designer provides multiple search actions located in the main toolbar's Search menu.


Go To: Table of Contents

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 relationship types 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 thru 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 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.

Go To: Table of Contents

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.


SQL Explorer Preferences provide a way to customize the result preview row count and the actual result row count. If a query plan should be generated each time a query is executed, keep the Generate query plans preference checked. Note: Changes to this preference do not affect existing connections.


SQL Editor Preferences provide a way to customize the font properties of the editor and the separator character used when exporting results to the clipboard.