0
votes

We are reading a txt file which is size of less than 100 KB and generating output txt file using below transformation logic. To generate output txt file in production, it is taking more than 3 minutes . Is there anyway to reduce processing time.

  • Mule Runtime: 4.2.1
import * from dw::core::Strings
//output application/csv
output application/flatfile schemaPath = "output-fixed-witdh.ffd" , segmentIdent = "output-fixed-witdh"
---

payload map {
    FirstName_Out: $.ParticipantFirstName,
    LastName_Out: $.ParticipantLastName,
    IssueDate_Out: ($.ReimbursementDate splitBy ("/") map (if(sizeOf($)==1) "0" ++ $ else $) joinBy "/")  as Date {format: "MM/dd/yyyy"} as String {format: "MMddyy"},
    Amount_Out: ($.Amount as Number*100) as String {format: "0000000000"},
    CheckType_Out: $.Method,
    CheckNumber_Out: $.PaymentNumber
}

Below is the schema used:

form: FIXEDWIDTH
id: 'output-fixed-witdh'
name: 'output-fixed-witdh'
values: 
- { name: 'FirstName_Out', usage: M, type: String, length: 20 }
- { name: 'LastName_Out', usage: M, type: String, length: 20 }
- { name: 'IssueDate_Out', usage: M, type: String, length: 6 }
- { name: 'Amount_Out', usage: M, type: String, length: 10 }
- { name: 'CheckType_Out', usage: M, type: String, length: 2 }
- { name: 'CheckNumber_Out', usage: M, type: String, length: 8 }
1
Hi Kiran, can you add a fragment of the input? Is it a flat file also? Do you have an ffd schema for it?Jorge Garcia
I agree with @JorgeGarcia. There is too little context to understand the problem. Also, are you sure the time is spent in this transformation?aled
added fragment details in the question it self. Please check it.Kiran
Have you confirmed that the time is consumed in this specific transformation? How many records does the file contain?aled
only one file size of 7KB and having 70 rows and 13 columns.Kiran

1 Answers

0
votes

I would say it is Windows issue. Try it on Linux. We have app which does work on Windows for 6 hours and 10 minutes on Linux. Give it a try.