JBoss.orgCommunity Documentation
Go To: Table of Contents
The Designer User's Guide provides detailed descriptions of Designer features and functionality.
Teiid Designer is an Eclipse-based graphical modeling tool for modeling, analyzing, integrating and testing multiple data sources to produce Relational, XML and Web Service Views that expose your business data.
Teiid Designer is a visual tool that enables rapid, model-driven definition, integration and testing of data services without programming. With Teiid Designer , not only do you map from data sources to target formats using a visual tool, but you can also:
resolve semantic differences
create virtual data structures at a physical or logical level
use declarative interfaces to integrate, aggregate, and transform the data on its way from source to a target format which is compatible and optimized for consumption by your applications
resolve semantic differences
This allows you to abstract the structure of the information you expose to and use in your applications from the underlying physical data structures. With Designer, data services are defined quickly, the resulting artifacts are easy to maintain and reuse, and all the valuable work and related metadata are saved for later reference.
You can use Designer to integrate multiple sources, and access them using the common data access standards:
Web Services / SOAP / XML
JDBC / SQL
ODBC / SQ
Teiid Designer is an integral part of the Teiid enterprise-class system for providing data services for service-oriented architectures.
Metadata is data about data. A piece of metadata, called a meta object in the Designer, contains information about a specific information structure, irrespective of whatever individual data fields that may comprise that structure.
Let’s use the example of a very basic database, an address book. Within your address book you certainly have a field or column for the ZIP code (or postal code number). Assuming that the address book services addresses within the United States, you can surmise the following about the column or field for the ZIP code:
Named ZIPCode
Numeric
A string
Nine characters long
Located in the StreetAddress table
Comprised of two parts: The first five digits represent the five ZIP code numbers, the final four represent the ZIP Plus Four digits if available, or 0000 if not
Formatted only in integer numeric characters. Errors will result if formatted as 631410.00 or 6314q0000
This definition represents metadata about the ZIP code data in the address book database. It abstracts information from the database itself and becomes useful to describe the content of your enterprise information systems and to determine how a column in one enterprise information source relates to another, and how those two columns could be used together for a new purpose
You can think of this metadata in several contexts:
What information does the metadata contain? (see Business and Technical Metadata)
What data does the metadata represent? (see Source and View Metadata)
How will my organization use and manage this metadata? (see Design-Time and Runtime Metadata)
The Designer helps you to create and describe an abstract graphic representation of your data structure of your data in the original data sources. It also describes whether those data sources are composed of Relational databases, text files, data streams, legacy database systems, or some other information type.
The Designer allows you to create, edit, and link these graphically-represented meta objects that are really a description of your data, and not the data itself.
So when this documentation describes the process of creating, deleting, or editing these meta objects, remember that you are not, in fact, modifying the underlying data.
A metadata model represents a collection of metadata information that describes a complete structure of data.
In a previous example we described the field ZIPCode as a metadata object in an address book database.. This meta object represents a single distinct bit of metadata information. We alluded to its parent table, StreetAddress. These meta objects, and others that would describe the other tables and columns within the database, would all combine to form a Source Metadata model for whichever enterprise information system hosts all the objects.
You can have Source Models within your collection of metadata models These model physical data storage locations. You can also have View Models, which model the business view of the data. Each contains one type of metadata or another. For more information about difference between Source and View metadata, see “Source and View Metadata.”
NOTE: For detailed information about creating models from your metadata, see Models 101
Metadata can include different types of information about a piece of data.
Technical metadata describes the information required to access the data, such as where the data resides or the structure of the data in its native environment.
Business metadata details other information about the data, such as keywords related to the meta object or notes about the meta object.
Note that the terms technical and business metadata, refer to the content of the metadata, namely what type of information is contained in the metadata. Don’t confuse these with the terms “physical” and “view” metadata that indicate what the metadata represents. For more information, see Source and View Metadata.
Technical metadata represents information that describes how to access the data in its original native data storage. Technical metadata includes things such as datatype, the name of the data in the enterprise information system, and other information that describes the way the native enterprise information system identifies the meta object
Using our example of an address book database, the following represent the technical metadata we know about the ZIP code column:
Named ZIPCode
Nine characters long
A string
Located in the StreetAddress table
Uses SQL Query Language
These bits of information describe the data and information required to access and process the data in the enterprise information system.
Business metadata represents additional information about a piece of data, not necessarily related to its physical storage in the enterprise information system or data access requirements. It can also represent descriptions, business rules, and other additional information about a piece of data.
Continuing with our example of the ZIP Code column in the address book database, the following represents business metadata we may know about the ZIP code:
The first five characters represent the five ZIP code numbers, the final four represent the ZIP Plus Four digits if available, or 0000 if not
The application used to populate this field in the database strictly enforces the integrity of the data format
Although the first might seem technical, it does not directly relate to the physical storage of the data. It represents a business rule applied to the contents of the column, not the contents themselves.
The second, of course, represents some business information about the way the column was populated. This information, although useful to associate with our definition of the column, does not reflect the physical storage of the data.
Teiid software distinguishes between design-time metadata and run-time metadata. This distinction becomes important if you use the Teiid 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.
Design-time metadata refers to data within your local directory that you have created or have imported. You can model this metadata in the Designer, adding Source and View metadata.
Once you have adequately modeled your enterprise information systems, including the necessary technical metadata that describes the physical structure of your sources, you can use the metadata for data access.
To prepare the metadata for use in the Teiid Server, you take a snapshot of a metadata model for the Teiid Server to use when resolving queries from your client applications. This run-time metadata represents a static version of design-time metadata you created or imported. This snapshot is in the form of a Virtual Database definition, or VDB.
As you create this runtime metadata, the Designer:
derives the runtime metadata from a consistent set of metadata models.
creates a subset of design-time metadata, focusing on the technical metadata that describes the access to underlying enterprise information systems.
optimizes runtime metadata for data access performance.
You can continue to work with the design-time metadata, but once you have created a runtime metadata model, it remains static.
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 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 Data Needs.”
When you model the Source Metadata within your enterprise information systems, you capture some detailed information, including:
Identification of datatype
Storage formats
Constraints
Source-specific locations and names
The Source Metadata captures this detailed technical metadata to provide a map of the data, the location of the data, and how you access it.
This collection of Source Metadata comprises a direct mapping of the information sources within your enterprise. If you use the Teiid Server for information integration, this technical metadata plays an integral part in query resolution.
For example, our ZIPCode column and its parent table StreetAddress map directly to fields within our hypothetical address book database.
To extend our example, we might have a second source of information, a comma-separated text file provided by a marketing research vendor. This text file can supply additional demographic information based upon address or ZIP code. This text file would represent another EIS, and the meta objects in its Source Model would describe each comma-separated value.
When you create View Metadata, you are not describing the nature of your physical data storage. Instead, you describe the way your enterprise uses the information in its day-to-day operations.
View Metadata derives its classes and attributes from other metadata. You can derive View Metadata from Source Metadata that describes the ultimate sources for the metadata or even from other View Metadata. However, when you model View Metadata, you create special “views” on your existing enterprise information systems that you can tailor to your business use or application expectations. This View Metadata offers many benefits:
You can expose only the information relevant to an application. The application uses this View Metadata to resolve its queries to the ultimate physical data storage.
You can add content to existing applications that require different views of the data by adding the View Metadata to the existing View Metadata that application uses. You save time and effort since you do not have to create new models nor modify your existing applications.
Your applications do not need to refer to specific physical enterprise information systems, offering flexibility and interchangeability. As you change sources for information, you do not have to change your end applications.
The View Metadata models document the various ways your enterprise uses the information and the different terminology that refers to that information. They do so in a central location.
Our example enterprise information sources, the address book database, and the vendor-supplied comma-delimited text file, reside in two different native storage formats and therefore have two Source Metadata models. However, they can represent one business need: a pool of addresses for a mass mailing.
By creating a View Metadata model, we could accurately show that this single View Table, the AddressPool, contains information from the two enterprise information systems. The View Metadata model not only shows from where it gets the information, but also the SQL operations it performs to select its information from its source models.
This View Metadata can not only reflect and describe how your organization uses that information, but, if your enterprise uses the Teiid 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.
By modeling View Metadata, you can illustrate the business view of your enterprise information sources. View Metadata models not only describe that business view, but also illustrate how the meta objects within the View Metadata models derive their information from other metadata models.
Let’s return to the example of our address book database and the vendor’s comma-separated list. We want to generate the View Metadata model, Address Pool, from these enterprise information systems.
The transformation that joins these metadata models to create the virtual Address Pool metadata model contains a SQL query, called a union, that determines what information to draw from the source metadata and what to do with it.
The resulting Address Pool contains not only the address information from our Address Book database, but also that from our vendor-supplied text file.
Transformations contain SQL queries that SELECT the appropriate attributes from the information sources.
For example, from the sources the transformation could select relevant address columns, including first name, last name, street address, city, state, and ZIP code. Although the metadata models could contain other columns and tables, such as phone number, fax number, e-mail address, and Web URL, the transformation acts as a filter and populates the Address Pool metadata model with only the data essential to building our Address Pool.
You can add other SQL logic to the transformation query to transform the data information. For example, the address book database uses a nine-character string that represents the ZIP Plus Four. The transformation could perform any SQL-supported logic upon the ZIPCode column to substring this information into the format we want for the Address Pool View metadata model.
When you model View Metadata, you can also create a View XML Document model. This View Document lets you select information from within your other data sources, just like a regular View Metadata model, but you can also map the results to tags within an XML document.
In this example, the Address Pool View Metadata model still selects its information from the Address Book Database and the Vendor Text File, but it also maps the resulting columns into tags in the Address XML document.
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, 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 system.
The fundamental models in Teiid 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.
Models are defined using Teiid Designer in various ways:
Created via importing source data characteristics. (see Import Wizard)
Manual creation via New Model Wizard
Transforming or copying from one model into another (see New Model Wizard options)
Various custom actions
Teiid Designer can be used to model a variety of classes of models. Each of these represent a conceptually different classification of models.
Relational - Model data that can be represented in table – columns and records – form. Relational models can represent structures found in relational databases, spreadsheets, text files, or simple Web services.
XML - Model that represents the basic structures of XML documents. These can be “backed” by XML Schemas. XML models represent nested structures, including recursive hierarchies.
XML Schema - W3C standard for formally defining the structure and constraints of XML documents, as well as the datatypes defining permissible values in XML documents.
XML Service - TBD.
Web Services - which define Web service interfaces, operations, and operation input and output parameters (in the form of XML Schemas).
Model Extensions - for defining property name/value extensions to other model classes.
Function - The Function metamodel supports the capability to provide user-defined functions, including binary source jars, to use in custom transformation SQL statements. Currently only a single UDF model is supported by Teiid Designer. See UDFs View for details.
Relationship - TBD.
UML 2.0 - TBD.
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.
Models used for data integration are packaged into a virtual database (VDB). The models must be in a complete and consistent state when used for data integration. That is, the VDB must contain all the models and all resources they depend upon. Models contained within a VDB can be imported into the Teiid Designer. In this way, VDBs can be used as a way to exchange a set of related models. (See description in VDB Editor section)
A connector binding provides the connectivity to the source for the query engine when it is executing queries to that source.
All Source models must have connector bindings associated with them in a VDB in order to be tested in Designer or deployed for data access.
It is possible that multiple models may use the same binding, but each model must have a binding.
In Teiid Designer, bindings are automatically created "under the hood" when you import from a specific supported data source. You can also create and maintain your own custom bindings. (see Manage Connector Bindings)
Models must be in a valid state in order to be used for data access. Validation of a single model means that it must be in a self-consistent and complete state, meaning that there are no "missing pieces" and no references to non-existent entities. Validation of multiple models checks that all inter-model dependencies are present and resolvable.
Models must always be validated when they are deployed in a VDB for data access purposes.
Enterprise Designer will automatically validate your models whenever the user Saves ( Note: the "Models > Validate Automatically" option must be checked). When editing models, the editor tabs will display a "*" to indicate that the model has unsaved changes.
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. The preview functionality leverages an embedded version of the Teiid Server, so you can be sure that the behavior in the 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 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
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 connector bindings.
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 connector bindings. (See Connectors view and Manage Connector Bindings)
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.