Your organization stores purchase order details, such as customer ID, item codes, and item quantity, in Microsoft Excel spreadsheets in HDFS. You need to remove all private customer data and change the data into text files for storage, so you can use the data for auditing.
Create a mapping that reads all the purchase records from the file in HDFS using a data object with an intelligent structure. Then use the mapping to parse the data and write it to a storage target.
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.
To configure the mapping, perform the following tasks:
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.