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

Chapter 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

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.