CSV Splitting In Informatica cloud platform (IICS)
February 18, 2019Informatica Cloud File Processor Connector
March 1, 2019Problem Description
Randomization In Informatica Cloud: Customers/Users face issues in picking multiple CSV files with having the same base name from a directory and generates multiple Excel files for each CSV file. The Excel files need to be generated based upon either percentage of available filtered records or an exact number of records and maximum records allowed in a single excel file. The filtration of records is based upon the specific column and its specific value.
Challenges to User/Developer
Randomization In Informatica Cloud :
- In IDMC (Formerly known as IICS), the above-mentioned problem can be solved through Java Transformation.
- The Excel files need to be generated based upon either percentage of available filtered records or an exact number of records and maximum records allowed in a single excel file. The filtration of records is based upon the specific column and its specific value.
- Move the original CSV file to another location.
Solution
Randomization In Informatica Cloud (IDMC)
Approach –
Randomization In Informatica Cloud: Using Java Transformation, we can achieve the solution for the above-mentioned challenges.
Java transformation is used to add custom integration logic into mappings using a built-in developer-friendly editor or by plugging in custom JAR files.
Technical Solution –
- Develop Java code that performs CSV to Excel split upon either percentage of available filtered records or an exact number of records and maximum records allowed in a single excel file. The filtration of records is based upon the specific column and its specific value using IDE (ex. Eclipse)
- Create an Executable jar file for the above-developed java code.
- Place the above-created jar file at any directory at the local machine (where the security agent is installed).
- Copy the above directory path including the jar name with extension.
- Create the CLASSPATH Environment variable if not available.
- Paste the above-copied directory to the CLASSPATH Environmental variable.
- Restart the secure agent.
- Create the mapping using source and target with java transformation in between them.
- Edit java transformation to make a call to the specific method of the class available in a jar which is responsible for splitting the CSV to Excel split upon either percentage of available filtered records or an exact number of records and maximum records allowed in a single excel file. The filtration of records is based upon the specific column and its specific value.
- Compile the above java code, validate the mapping and run.
Advantage –
The CSV file will get split into Excel based upon either percentage of available filtered records or an exact number of records and maximum records allowed in a single excel file. The filtration of records is based upon the specific column and its specific value
Issues –
None
Conclusion
The CSV file will split into excel based on certain conditions.