JBoss.orgCommunity Documentation
Integrating data from a Enterprise Information System (EIS) into Teiid, is separated into two parts.
A Translator, which is required.
An optional Resource Adapter, which will typically be a JCA Resource Adapter (also called a JEE Connector)
A Translator is used to:
Translate a Teiid-specific command into a native command.
Execute the command.
Return batches of results translated to expected Teiid types.
A Resource Adapter:
Handles all communications with individual enterprise information system (EIS), which can include databases, data feeds, flat files, etc.
Can be a JCA Connector or any other custom connection provider. The reason Teiid recommends and uses JCA is this specification defines how one can write, package, and configure access to EIS system in consistent manner. There are also various commercial/open source software vendors already providing JCA Connectors to access a variety of back-end systems.
Abstracts Translators from many common concerns, such as connection information, resource pooling, or authentication.
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:
JDBC: Works with many relational databases. The JDBC translator is validated against the following database systems: Oracle, Microsoft SQL Server, IBM DB2, MySQL, Postgres, Derby, Sybase, H2, and HSQL. In addition, the JDBC Translator can often be used with other 3rd-party drivers and provides a wide range of extensibility options to specialize behavior against those drivers.
File: Provides a procedural way to access the file system to handle text files.
WS: Provides procedural access to XML content via Web Services.
LDAP: Accesses to LDAP directory services.
Salesforce: Works with Salesforce interfaces.
High-level Translator development procedure:
???Create a new or reuse an existing Resource Adapater for the EIS system, to be used with this Translator
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
Define the template for exposing configuration properties.
Deploy your Translator.
Deploy a Virtual Database (VDB) utilizing your Translator.
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.
The following resource adapters are available to Teiid.
DataSource: This is provided by the JBoss AS container. This is used by the JDBC Translator.
File: Provides a JEE JCA based Connector to access defined directory on the file system. This is used by the File Translator
WS: Provides JEE JCA Connector to invoke Web Services using JBoss Web services stack. This is used by the WS Translator
LDAP: Provides JEE JCA connector to access LDAP; Used by the LDAP Translator.
Salesforce: Provides JEE JCA connector to access Salesforce by invoking their Web Service interface. Used by the SalesForce Translator.
High-level Resource Adapter development procedure:
Understand the JEE Connector specification to have basic idea about what JCA connectors are how they are developed and packaged.
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.
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
Package your resource adapter.
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:
You may add User Defined Functions.
You may adapt logging to your needs, which is especially useful for custom audit or command logging.
You may change the security subsystem for custom authentication and authorization.