![]() ![]() Say, we have to process all lines of above file where fourth field has Flag set to ‘D’, or Debit indicator. Also, sometimes we have to do various checks on number of fields to validate if a line in the file is worth processing or not, before hand, to stop flow of unnecessary data. This date which can be “,” or tab or “|” delimited or is of fixed length, creates additional complexity as first they have to be read, sorted, converted to xml (for mapping to some target structure) before they can be finally processed. Most often these files are huge compared to when we get data as xml or json format. In CPI (SAP Cloud Platform Integration) sometimes, we come across scenarios where we need to process an input csv or any other character delimited text file. In this blog post, I will show alternate ways to handle them, not only how to read large files but also how to manipulate them. Most often this is done via converting them to string format, which is very much memory intensive. Mostly before converting them to xml required for mapping, we do read them via groovy scripts and also manipulate the data. Handling huge text files (which are either csv or fixed length)is a challenge in CPI (SAP Cloud Platform Integration).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |