Developer’s Guide
This guide contains information for developers creating custom solutions with Teiid. It covers creating JEE JCA connectors with the Teiid framework, Teiid Translators, Teiid User Defined Functions (UDFs) as well as related topics.
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 is used to:
-
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. Refer to http://java.sun.com/j2ee/connector/.
-
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.
Do You Need a New Translator?
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 numerous built-in translators, including:
-
JDBC Translator - 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 Translator - Provides a procedural way to access the file system to handle text files.
-
WS Translator - Provides procedural access to XML content using Web Services.
-
LDAP Translator - Accesses to LDAP directory services.
-
Salesforce Translator - Works with Salesforce interfaces.
To see a full list of available translators, see Translators
If there’s not an available translator that meets your need, Teiid provides the framework for developing your own custom translator. See the Translator Development section, as it will describe how to develop, package and deploy a custom developed translator.
Do You Need a New Resource Adapter?
As mentioned above, for every Translator that needs to gather data from external source systems, it requires a resource adapter.
The following are some of resource adapters that are available to Teiid:
-
DataSource: This is provided by the WildFly 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 WildFly 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.
To see a full list, see Deploying VDB Dependencies
If there’s not an available resource-adapter that meets your need, Teiid provides the framework for developing your own JEE JCA Connector. See the Developing JEE Connectors section, as it will describe how to develop, package and deploy a resource adapter.
Other Teiid Development
Teiid is highly extensible in other ways:
-
You may add User Defined Functions. Refer to User Defined Functions.
-
You may adapt logging to your needs, which is especially useful for custom audit or command logging. Refer to Custom Logging.
-
You may change the subsystem for custom authentication and authorization. Refer to Custom Login Modules.