Datahub overview

We might have heard about Datahub several times in many hybris e-commerce applications as its widely accepted solution for data integration.

What is Datahub ?


It is a powerful data integration system which provides a communication mechanism between multiple source and target systems

In other words,
It is a web application which provides a complete infrastructure to transfer the data between the systems

In technical words,
Datahub in hybris is a set of extensions which is deployed as a web application on Tomcat server

Hybris has provided Datahub with its commerce suite, we just need to enable it by adding corresponding extensions in localextensions.xml and we need to do a small setup to deploy datahub web application on Tomcat.

Datahub is also called as Staging area where external data can be analysed and corrected before pushing it to target system

Why do we need Datahub ?


We know that, Hybris is just an order capturing system, once the order is placed, it has to be processed by some ERP system like SAP ERP.
So we need to send order details to SAP ERP through some connector

Similarly, we know that Hybris need to get actual product data , stock data , price data , customer data etc from ERP systems and again we need to have some connector here.

There are several ways to establish the connection between ERP and hybris system and one such popular way is through Datahub.

Datahub can be used as a connector between Hybris and ERP system

There are 2 important terms which we need to understand here
1) Inbound process
2) Outbound process

Inbound process
It is the process of replicating data from ERP to Hybris system
Source : ERP system Target : Hybris system


In this process, ERP system will send the data to datahub using standard formats like XML,CSV

If it’s an SAP ERP, it will send the IDOC which is nothing but the XML file

This data will be received by inbound adapters and using spring integration and datahub mechanism data will be processed into various stages and finally data will be pushed to target system

Example : Replication of Master data such as Product,customer,stock , price etc) from ERP to Hybris

Outbound process
It is the process of passing data from Hybris to ERP system
Source : Hybris system Target : ERP system


In this process, Hybris system will send the data to datahub using standard formats like XML,CSV

If target system is SAP ERP, then we need to send the IDOC which is nothing but the XML file

This data will be received by outbound adapters and using spring integration and datahub mechanism data will be processed into various stages and finally data will be pushed to target system

Example : Sending order details to ERP system for further processing of that Order.

3 important item types in Datahub


Raw Items : Exact representation of data coming from source system
Example: In case of SAP ERP, Raw items represents IDOC from SAP ERP

Canonical Items : Items which are processed by datahub using some concepts like composition and grouping.
These items are well organized as per the requirement so that target system can use it

Target items : Exact representation of data as expected by the target system

3 important Execution stages in datahub

Load

In this phase, data is loaded into datahub using inbound extension
Datahub converts this data into raw items and pass it for further processing

Composition

In this phase, copy of raw items goes through grouping and composition and finally canonical items will be created as per the grouping and composition rules

Publication

In this phase, canonical items will be published to target system
During publication phase datahub uses the target.xml file to transform the canonical data into target compatible output.

Then the target system adapter accepts the target item from the publication process and passes it to the target system.

We can relate all the above points through below diagram

DataHub-Overview

About the Author

Karibasappa G C (KB)
Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on