JBoss.orgCommunity Documentation

Chapter 1. Developing For Teiid

1.1. Introduction to the Teiid Connector Architecture
1.2. Do You Need a New Translator?
1.2.1. Custom Translators
1.3. Do You Need a New Resource Adapter?
1.3.1. Custom Resource Adapters
1.4. Other Teiid Development

A Translator is used to:

A Resource Adapter:

Given a combination of a Translator + Resource Adapter, one can connect any EIS system to Teiid for their data integration needs.

Teiid provides several translators for common enterprise information system types. If you can use one of these enterprise information systems, you do not need to develop a custom one.

Teiid offers the following translators:

High-level Translator development procedure:

  1. ???Create a new or reuse an existing Resource Adapater for the EIS system, to be used with this Translator

  2. Implement the required classes defined by the Translator API.

    • Create an ExecutionFactory – Extend the org.teiid.translator.ExecutionFactory class

    • Create relevant Executions (and sub-interfaces) – specifies how to execute each type of command

  3. Define the template for exposing configuration properties.

  4. Deploy your Translator.

    • Deploy a Virtual Database (VDB) utilizing your Translator.

  5. Execute queries via Teiid.

This guide covers how to do each of these steps in detail. It also provides additional information for advanced topics, such as streaming large objects. For sample Translator code, please check the Teiid source code

As mentioned above, for every Translator that needs to gather data from external source systems, it requires a resource adapter.

High-level Resource Adapter development procedure:

  1. Understand the JEE Connector specification to have basic idea about what JCA connectors are how they are developed and packaged.

  2. Gather all necessary information about your Enterprise Information System (EIS). You will need to know:

    • API for accessing the system

    • Configuration and connection information for the system

    • Expectation for incoming queries/metadata

    • The processing constructs, or capabilities, supported by information system.

    • Required properties for the connection, such as URL, user name, etc.

  3. Base classes for all of the required supporting JCA SPI classes are provided by the Teiid API. The JCA CCI support is not provided from Teiid, since Teiid uses the Translator API as it's common client interface. You will want to extend:

    • BasicConnectionFactory – Defines the Connection Factory

    • BasicConnection – represents a connection to the source.

    • BasicResourceAdapter – Specifies the resource adapter class

  4. Package your resource adapter.

  5. Deploy your resource adapter.

This guide covers how to do each of these steps in detail. It also provides additional information for advanced topics, such as transactions. For a sample resource adapter code, please check the Teiid Source code

Teiid is highly extensible in other ways: