JBoss.orgCommunity Documentation

Chapter 11. Testing Your Models

11.1. Manage Connection Profiles
11.1.1. Set Connection Profile for Source Model
11.1.2. View Connection Profile for Source Model
11.1.3. Remove Connection Profile from Source Model
11.2. Previewing Data For a Model
11.2.1. Preview Relational Table or View
11.2.2. Preview Relational Table With Access Pattern
11.2.3. Preview Relational Procedure
11.2.4. Preview Web Service Operation
11.2.5. Sample SQL Results for Preview Data
11.2.6. Execution Plans
11.3. Testing With Your VDB
11.3.1. Creating Data Sources
11.3.2. Execute VDB from Model Explorer
11.3.3. Deploy VDB from Model Explorer
11.3.4. Executing a Deployed VDB

As described briefly in Section 1.3.8, “Testing Your Models”, 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 Data Tools Platform (DTP) Connection Profile framework for connection management. Connection Profiles provide a mechanism to connect to relational and non-relational 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 Teiid server contents in the Section 3.1, “Setting up a Server” 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 Section 11.2.5, “Sample SQL Results for Preview Data” view. This action is accessible throughout the Teiid Designer in various view toolbars and context menus.

There are two requirements for previewing your data:

  1. The selected object must be one of several previewable model object types
  2. 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.


Any virtual table, view or procedure is previewable as long as all "physical" source models reference sufficient connection info. (See ??? view)

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

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

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

Testing Your Transformations

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

You can change your transformation SQL, re-validate and preview your the data for your modified SQL.

The following sections provide steps for previewing your data.

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.

To execute a VDB, that's been deployed manually, follow the steps below: