Your organization needs to analyze purchase order details such as customer ID, item codes, and item quantity. The purchase order details are stored in Microsoft Excel spreadsheets in HDFS. The data must be changed into text files for storage. In addition, private customer data must be removed. Create a mapping that reads all the purchase records from the file in HDFS using a data object with an intelligent structure. The mapping must parse the data and write it to a storage target.
You can use the extracted data for auditing.
The following figure shows the example mapping:
You can use the following objects in the HDFS mapping:
The input object, Read_transformation_with_intelligent_structure_model, is a Read transformation that processed a Microsoft Excel file stored in HDFS and creates field output.
Amazon S3 Output
The output object, Write_transformation, is a Write transformation that represents an Amazon S3 bucket.
When you run the mapping, the Data Integration Service reads the file in a binary stream and passes it to the Read transformation. The Read transformation extracts the relevant data in accordance to the intelligent structure and passes data to the Write transformation. The Write transformation writes the data to the storage target.
You can configure the mapping to run in a Hadoop run-time environment.
Complete the following tasks to configure the mapping:
Create an HDFS connection to read files from the Hadoop cluster.
Create a complex file data object read operation. Specify the following parameters:
The intelligent structure as the resource in the data object. The intelligent structure was configured so that it does not pass sensitive data.
The HDFS file location.
The input file folder location in the read data object operation.
Drag and drop the complex file data object read operation into a mapping.
Create an Amazon S3 connection.
Create a Write transformation for the Amazon S3 data object and add it to the mapping.