Individual product catalogs and user profile repositories can vary widely from one customer site to another. However, the Data Warehouse is a fixed structure; therefore, a map is required. The mapping is done using an XML file with the structure shown below, which allows you to map between any Oracle Commerce Platform repository and the Data Warehouse for data loading purposes.

You must map each item and property in your product catalog that you want to report on to the Data Warehouse.

<data-warehouse-dimension-loader-definition>
  <data-warehouse-repository repository="path_to_warehouse_repository">
    <data-warehouse-repository-item item="item_name">
      <production-repository repository="path_to_production_repository">
          <production-repository-item item="item_name" natural-key="key"/>
      </production-repository>
      <property-mappings>
        <warehouse-property name="name" default-value="value">
          <production-property name="name"/>
        </warehouse-property>
      </property-mappings>
    </data-warehouse-repository-item>
  </data-warehouse-repository>
</data-warehouse-dimension-loader-definition>

The data-warehouse-repository names the destination repository and contains the destination repository items. The production-repository names the source repository and items.

<data-warehouse-dimension-loader-definition>
  <data-warehouse-repository
      repository="/atg/reporting/datawarehouse/WarehouseRepository">
    <data-warehouse-repository-item item="category"
        natural-key="categoryId">
      <production-repository
          repository="/atg/commerce/catalog/ProductCatalog"
          nickname="catalog">
        <production-repository-item item="category"/>
      </production-repository>

The property-mappings element contains the individual warehouse-properties to be mapped for a specific warehouse item.

In cases where there is a simple one-to-one mapping between the repository item property and the Data Warehouse item property, the production-property element identifies the repository item property which is mapped to the corresponding warehouse-property element. This example uses the user’s first name from the profile repository:

<property-mappings>
  <warehouse-property name="firstName">
    <production-property name="ProfileRepository.user.firstName"/>
  </warehouse-property>
</property-mappings>

In some cases, there is not a one-to-one mapping, so a converter component is used. Converters perform tasks such as:

For example, the AddressToRegionItemConverter component combines the user’s state and country into the region used by the Data Warehouse.

<warehouse-property name="homeRegion" conversion-
    component="/atg/reporting/datawarehouse/process/converter/
    AddressToRegionItemConverter">
  <production-property name="ProfileRepository.user.homeAddress.state"
      conversion-context-name="state"/>
  <production-proprerty name="ProfileRepository.user.homeAddress.country"
      conversion-context-name="country"/>
</warehouse-property>

Copyright © 1997, 2016 Oracle and/or its affiliates. All rights reserved. Legal Notices