Question 1
Q1A financial services company is using an Oracle Integration Cloud (OIC) orchestrated integration to process large CSV files containing daily stock trades from an on-premises SFTP server. The integration parses each record, enriches it with data from a REST API, and inserts it into an Oracle Autonomous Data Warehouse (ADW). During peak trading days, the integration instance fails intermittently with out-of-memory errors, and the processing time exceeds the required service level agreement (SLA). The current implementation uses a 'Read File' operation with the 'Process in Chunks' option, but the entire file content is loaded into a variable before the for-each loop begins.
Which modification represents the most effective and memory-efficient approach to resolve this issue?
Show answer & explanation
Correct answer: B
The most effective solution for handling large files and avoiding out-of-memory errors is to use the Stage File action with the 'Read File in Segments' operation. This approach processes the file in manageable chunks without loading the entire content into memory at once. Placing this operation within a while loop allows the integration to iterate through all segments of the file efficiently, which is the recommended pattern for large file processing. Increasing memory or using 'Process in Chunks' on a 'Read File' operation does not solve the underlying issue of loading the whole file into memory before processing.