JBoss.orgCommunity Documentation

Chapter 10. Testing Your Models

10.1. Manage Connection Profiles
10.1.1. Set Connection Profile for Source Model
10.1.2. View Connection Profile for Source Model
10.1.3. Remove Connection Profile from Source Model
10.2. Previewing Data For a Model
10.2.1. Preview Relational Table or View
10.2.2. Preview Relational Table With Access Pattern
10.2.3. Preview Relational Procedure
10.2.4. Preview Web Service Operation
10.2.5. Sample SQL Results for Preview Data
10.3. Testing With Your VDB
10.3.1. Creating Data Sources
10.3.2. Execute VDB from Model Explorer
10.3.3. Deploy VDB from Model Explorer
10.3.4. Executing a Deployed VDB

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

Teiid Designer utilizes the Eclipse Datatools' Connection Profile framework for connection management. Connection Profiles provide a mechanism to connect to JDBC and non-JDBC sources to access metadata for constructing metadata source models. Teiid Designer also provides a custom Teiid connection profile template designed as a JDBC source to a deployed VDB.

By selecting various Teiid Designer Import options, any applicable Connection Profiles you have defined in your Database Development perspective will be available to use as your import source. From these import wizards you can also create new connection profiles or edit existing connection profiles without leaving the wizard.

The Section 4.3, “Teiid View” provides access to running Teiid instances and shows data source and VDB artifacts deployed there. The "Create Data Source" action available on this view utilizes the available and applicable connection profiles.

Designing and working with data is often much easier when you can see the information you're working with. The Designer's Preview Data feature makes this possible and allows you to instantly preview the information described by any object, whether it's a physical table or a virtual view. In other words, you can test the views with actual data by simply selecting the table, view, procedure or XML document. Previewing information is a fast and easy way to sample the data. Of course, to run more complicated queries like what your application likely uses, simply execute the VDB Via DTP and type in any query or SQL statement.

After creating your models, you can test them by using the Preview Data action . By selecting a desired table object and executing the action, the results of a simple query will be displayed in the Figure 10.8, “SQL Results View” view. This action is accessible throughout the Teiid Designer in various view toolbars and context menus.

There are two requirements for previewing your data: the selected object must be one of several previewable model object types and all source models within the model dependency tree must reference a connection profile. Model objects that can be previewed include: relational tables and views (including tables involving access patterns), relational procedures, Web service operations and XML document staging tables.

Note that any virtual table, view or procedure is previewable as long as all "physical" source models reference sufficient connection info. (See Section 4.3, “Teiid View” view)

After selecting the Preview Data action, Designer will insure that all source models are associated with connection profiles and that all required passwords are set.

If the model selected for preview is a source model and there is insufficient connection info for that model, the following dialog will be displayed and the action terminated.


If any of the source models in the corresponding project require a password that can't be retrieved from an existing connection profile, the user will be queried for each missing password


Testing Your Transformations

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

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

The requirements for VDB execution are:

Teiid Designer simplifies this process via Deploy VDB and Execute VDB actions. Deploy VDB does just that, deploy a selected VDB to a running Teiid instance. Execute VDB performs the VDB deployment, creates a Teiid Connection Profile, opens the Database Development perspective and creates a connection to your VDB.