Feeds and Pools
Data Hub enables the management of data load and composition with the use of feeds and pools. Fragmented items can be loaded into distinct data pools using any number of separate feeds. Feeds and Pools allow a fine level of control over how data is segregated and processed.
Prerequisites: For additional background or context regarding the following material, see The SAP Commerce Cloud Data Hub Workflow.
Data Feeds
Data feeds enable you to configure how raw fragments enter Data Hub. When data is loaded using one of the available input channels, it is passed on to a data feed as specified in the load payload. The data feed then delivers raw items for processing to a specified data pool.
This level of control affords advantages including potential performance gains through parallel processing, or more fine-grained management of data through segregation. For example, you may wish for data from one source to enter the data hub through one feed, and data from another source through a second. You can have one or many feeds, feeding either one or several pools.
You create a new data feed using either the Data Hub API, the Backoffice Data Hub Cockpit, or a REST call. Provide the following information when creating a new data feed:
| Parameter | Usage | Description |
|---|---|---|
| name | required | A unique name for the data feed. |
| poolingStrategy | required | The strategy for data pool publication. The possible values are (GLOBAL_POOL and NAMED_POOL). |
| poolingCondition | required for the NAMED_POOL strategy | The name of the data pool to use for this data feed. The name of the data pool must be unique. |
| description | optional | A description of the data feed. |
Once Data Hub creates the data feed, raw data fragments can be loaded using one of the available input channels. By default, Data Hub creates a feed on start-up with the following parameters. This feed can be used out of the box to feed data into the GLOBAL pool.
{
"name": "DEFAULT_FEED",
"description": "Default feed",
"poolingStrategy": "GLOBAL_POOL"
}
Raw data entering Data Hub must have the data feed name specified as part of the data payload. The input channel can then pass the data to the correct feed. Multiple data feeds can be specified to load data into a single pool. For example, FeedCottonShirts and FeedPoloShirts can both load data into the GLOBAL_POOL.
Data Pools
Data pools enable you to isolate and manage your data within Data Hub, for composition and publishing. During the composition of raw items into canonical items, only data isolated within each pool is used. Therefore, ensure that all required data is available inside the pool for composition, for dereferencing, and for scenarios used in your extension.
You may have one or multiple pools. For example, you may wish to have one pool for each data type, or target system. Several feeds may deliver data to a single pool. One feed can also be configured to deliver data to several pools. You configure each of these options when setting up the data feed, using a pooling strategy.
Pooling Strategies
Pooling strategies are provided in the configuration of a feed. They determine how and where a data feed delivers raw items to a data pool. Data Hub offers two possible pooling strategies:
GLOBAL_POOL
The GLOBAL_POOL is the default pool. Unless otherwise specified, all loaded data enters the GLOBAL_POOL.
NAMED_POOL
With the named pool strategy, all loaded data enters the pool specified by a poolingCondition parameter. This parameter contains the pool name. If the poolingCondition refers to a data pool that does not exist such as, LongSleeveShirts, a new data pool by that name is automatically created. Multiple data feeds may load data to the same named pool.
Data Hub does not support manual creation of pools through the API. On start-up, Data Hub, by default, creates the GLOBAL pool. The NAMED_POOL strategy creates pools during the initial load of data using the data feed configuration.