OIC/Integration/7 → REST Connection with FTP to read and write a comma separated value (csv) file

integratio
4 min readAug 27, 2023

--

This is a post on Oracle Integration Cloud highlighting an integration exposed as a REST service that reads comma separated value FTP file and enrich the data and write it back as csv file in FTP target location.

Integration Gen 2

(1) Flow: [a] Receive → [b] Map to Read FTP file → [c] Read FTP file → [d] Map to Write file → [e] Write FTP file → [f] Map to Reply → [g] Reply

(2) Flow Description: Here we are creating an App Driven Orchestration flow exposing via REST which when invoked, reads csv file from FTP location, loops over the records and split the payload across multiple xml files based on a unique field value in source data and finally write to target FTP location.

(3) Steps:

Go to OIC console → Integrations → Create an App Driven Integration with your project name.

[a] Receive:

[c] Read FTP file:

You can create and use following csv: “CSV_Input.csv”

EmpId,EmpName,DeptId
100,"Amit Narayan",001
101,"Vinesh Shivraman",002
102,"Ganesh Reddy",003
103,"Pramod Kumar Saha",004
104,"Nithin Mishra",004
105,"Avishek Sen",003
106,"Navin Kumar Paul",002
107,"Subhash Chandra",004

[e] Write FTP file:

You can use the below CSV for defining the format , “CSV_Output.csv” :

EmpId,EmpName,DeptId,DeptName
100,"Amit Narayan",001,Management
101,"Vinesh Shivraman",002,Manufacturing
102,"Ganesh Reddy",003,Sales
103,"Pramod Kumar Saha",004,Marketing
104,"Nithin Mishra",004,Marketing
105,"Avishek Sen",003,Sales
106,"Navin Kumar Paul",002,Manufacturing
107,"Subhash Chandra",004,Marketing

[b] Map to Read Ftp file:

[e] Map to Write file:

[f] Map to Reply:

Output: “out.csv”

………………………………………………………………………………………………

--

--

integratio

📌 IT Backend enthusiast 📌 Blogging about Oracle FMW, Python, Cloud related technologies 📌 Non monetized, non hustle 📌 Knowledge sharing sole purpose