Big Data Management User Guide > Mappings in the Hadoop Environment > Data Warehouse Optimization Mapping Example
  

Data Warehouse Optimization Mapping Example

You can optimize an enterprise data warehouse with the Hadoop system to store more terabytes of data cheaply in the warehouse.
For example, you need to analyze customer portfolios by processing the records that have changed in a 24-hour time period. You can offload the data on Hadoop, find the customer records that have been inserted, deleted, and updated in the last 24 hours, and then update those records in your data warehouse. You can capture these changes even if the number of columns change or if the keys change in the source files.
To capture the changes, you can create the following mappings in the Developer tool:
Mapping_Day1
Create a mapping to read customer data from flat files in a local file system and write to an HDFS target for the first 24-hour period.
Mapping_Day2
Create a mapping to read customer data from flat files in a local file system and write to an HDFS target for the next 24-hour period.
m_CDC_DWHOptimization
Create a mapping to capture the changed data. The mapping reads data from HDFS and identifies the data that has changed. To increase performance, you configure the mapping to run on Hadoop cluster nodes in a Hadoop environment.
The following image shows the mapping m_CDC_DWHOptimization:
The image shows the following sources: CustomerData_Day1, CustomerData_Day2. It shows four Expression transformations. Extract_Key_NonKey_File1 connects to an Expression. Extract_Key_Nonkey_File2 connects to Expression 1. These transformations join to a Joiner transformation. The Joiner transformations connects to the following Filter transformations: Insert, Delete, and Update. It shows the following target objects: Write_HDFS_Insert, Write_HDFS_delete, Write_HDFS_update.
The mapping contains the following objects:
Consolidated_Mapping
Create a mapping to consolidate the data in the HDFS files and load the data to the data warehouse.
The following figure shows the mapping Consolidated_Mapping:
The image shows the following sources: Read_HDFS_delete, Read_HDFS_Insert, Read_HDFS_update. It shows the following Expression transformations: del_exp, Insert_exp, update_exp1. It shows a Union transformation and the Write_FF_ConsolidatedTarget.
The mapping contains the following objects:
You can open each mapping and right-click to run the mapping. To run all mappings in sequence, use a workflow.
The following image shows the example Data Warehouse Optimization workflow:
The image shows the Start Event and End Event with four mappings. It shows the following mappings: Mapping_Day1, Mapping_Day2, m_CDC_DWHOptimization, Consolidated_Mapping.
To run the workflow, use the infacmd wfs startWorkflow command.