Data Hub Extensions

Data Hub includes an engine for data management and transformation, and a framework for building data integrations. With a Data Hub, extension you can construct these data integrations and influence the functionality of the Data Hub engine.

Extensions are compiled as .jar files and placed on the Data Hub class path. They are loaded when the Data Hub starts before it performs any data handling functions. Extensions are not loaded haphazardly. Some extensions, like grouping or composition handlers, have explicit Spring properties defined to control when the handler runs in relation to other handlers. Other extensions have dependencies upon each other, so they only load after their defined predecessors. You control loading order by defining the dependencies in the extension XML. Data Hub automatically resolves these relationships during the extension loading process.

Data Hub Ships with Four Default Extensions

  • Test Adapter
  • File Adapter (an outbound adapter)
  • CSV Inbound Adapter
  • SAP Commerce Cloud Outbound Adapter

Additional Extensions are Available from SAP Commerce Cloud

There are other extensions for Data Hub included in SAP Commerce Cloud. Go to <HYBRIS_HOME>/hybris/bin/ext-integration/datahub/extensions. There is a c4c-integration directory and an sap directory. Both contain additional extensions.

How an Extension is Built

  1. The only required element in an extension is the XML file. It defines the data structure.
  2. Optionally, you can write custom java code for your extension when you want it to do more than an XML file can accomplish. Custom composition handlers are a good example. You may want to do more to the data during composition than the default handlers do. The simple solution is to create your own composition handler and place it in /opt/datahub/extensions.
  3. Optionally, you can use a Spring XML file. If you create a custom composition or grouping handler, you must create a Spring XML file, because that is where you set the processing order property. The name template for a Data Hub Spring file is your-extension-name/datahub-extension-spring.xml.