Skip to main content

Data Integration in 5 minutes

Data integration between multiple disparate sources is now as simple as writing SQL code in your application as if all your schema (tables, views and procedures) from different databases are co-located in a single data source.

No, I am not talking horizontal partitioning of your data that have same schema defined in all the databases that some other tools support. You can have segments of data to your liking or the way they were given to you. That not all, you can even add text files to this mix and use them as another source that is participating in data integration. All this is doable with Teiid.

All you have to do is to define the "data source(s)" you would like to integrate in a Teiid configuration file and configure Teiid as your JDBC data source in your application and start writing your application, which may be a simple JDBC or Hibernate application.

Sounds simple huh? Thanks to a new feature called "Connector Supplied Metadata", which is being introduced in the Teiid 6.2 release. This feature is so powerful that using it you can write a single EJB that reads or writes data to/from multiple sources, or you can write Hibernate application with single "Session Factory" that has domain objects from multiple different sources, where you can write Hibernate HQL query that joins two tables from different sources.

So What? Teiid had this capability all along!

Yes, you are right. There is nothing new in terms of additional capabilities of Teiid, it always supported data integration as its core capability. What is new is how it does it, and how flexible it is, and how fast you get from problem to the solution. Prior to Teiid 6.2 release in order to integrate two or more sources in Teiid the following steps must have to be taken.




Step 1: Using Teiid Designer, you need to import and create Source models

Step 2: Using the Teiid Designer, you need to create a VDB and add model files to VDB and configure the "Connectors" for the sources.

Step 3: Deploy into Teiid runtime.

Now, contrast the above scenario to below

as you can see the complete "modeling" step and building a VDB is eliminated (Step 1&2 from above) and metadata that is required for data integration is imported dynamically at runtime and working models are built automatically using "Connector Supplied Metadata" feature. However, user still needs to supply a configuration file where they can specify information about their sources! This configuration file called "Dynamic VDB". And you are required to deploy this configuration file into Teiid runtime engine.

This model does have its pros and cons, and may not suit all the data integration needs.

Pros
  • Metadata about your source imported dynamically at runtime, you have an option to cache after the first import.
  • No static model of your metadata, so it can keep changing as you change the source structure.
  • No Teiid Designer tool to use, cutting down on time and learning curve with Designer.
  • No VDB, i.e no custom artifacts to define your metadata, just define a simple XML file with your favourite editor.
  • Possible to write dynamic discovery of sources and integrate them on the fly.

Cons:
  • You can not define virtual tables, procedures composing of multiple sources.
  • You can not define a single view of your data.
  • Many enterprise features may not be available.
  • Currently only JBDC and Text based sources are supported, but more coming soon.
Teiid still supports both the Designer based VDB and Dynamic VDB modes. If you need a simple and quick data integration use the "Dynamic VDB", otherwise use the Teiid Designer to create a virtual database as before, after all it is all about flexibility.

So, next time you think about combining data from your Excel sheet with your Oracle data, do not custom code the integration layer, use Teiid instead. Give it a try! and let us know what you think. Thank you for reading.

You can check out a quick example here.

Thanks.

Ramesh..

Comments

Popular posts from this blog

Teiid Spring Boot 1.7.0 Released

Teiid Spring Boot version 1.7.0 to support Teiid 16.0 has been released. This release is mainly to support the Teiid's latest version.  In this release, the support for OpenAPI code generation based on VDB has been removed as there is no community interest and moreover it was at OpenAPI 2.0, and the industry has moved to 3.0 and beyond. There are no plans to further pursue this feature. VDB maven plugin was also removed, which was intended to be a replacement for the VDB importing feature was to be used when working on OpenShift, however, since it requires the Maven repository and does not completely represent the feature as defined on the WildFly based deployments this is also removed. You can still use the VDB import feature with Teiid Spring Boot, simply define the VDB with your "IMPORT DATABASE" statements and provide the additional files along with the main VDB file. During the start of the application, Teiid Spring Boot will load all the necessary DDL files for the

Teiid 8.13.3 Released

Teiid 8.13.3 is now  available .  In total 8.13.3 addresses 10 issues since 8.13.2: [ TEIID-4028 ] - adding salesforce-34 resource adapter does not work through the cli [ TEIID-4066 ] - Odata translator ClassNotFoundException: com.sun.ws.rs.ext.RuntimeDelegateImpl [ TEIID-4070 ] - Issues with resource adapters with api modules in wildfly [ TEIID-4089 ] - Teiid JDBC driver does not reset the update count when calling getMoreResults(int) [ TEIID-4093 ] - OData authentication fails with NPE when gss-pattern related properties are included in VDB [ TEIID-4096 ] - AssertionError with independent side of a dependent join that has an ordered limit [ TEIID-3050 ] - allow for more incremental insert with iterator [ TEIID-4075 ] - Netezza translator to support common table expressions [ TEIID-4098 ] - Always preserve columns order in google spreadsheets models [ TEIID-4046 ] - OData - $skip is beeing ignor

Expose Excel Data as OData feed using Teiid

For that matter you can expose any data source that is supported by Teiid through its translators as OData service. You can convert Relational databases XML, JSON, CSV files Web Services  Sales Force Excel documents sources, or write your on top of your specific source. Teiid added support for exposing its virtual database (VDB) as OData service without any additional work. Create a virtual database with your required sources and create any additional views and deploy in the the JBoss EAP 6.1 server, that has Teiid 8.3 or greater installed.  See https://docs.jboss.org/author/display/teiid84final/OData+Support  for more information. So, lets build a simple example of exposing the Excel Sheet. Teiid accesses Excel sheets via JDBC-ODBC bridge, and Windows OS provides a ODBC driver for Excel documents.  Edit the standalone-teiid.xml, and create Connection Factory jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};Dbq=c:\ODBC\ExcelData.xls odbc