OIC/Integration/4 → FTP Connection to download file with stage activity

integratio
3 min readAug 26, 2023

--

This is a post on Oracle Integration Cloud highlighting the integration of FTP adapter in the flow to download files using stage activity.

Integration

(1) Flow: [a] Schedule → [b] Map to List Ftp file → [c] List Ftp file → [d] For LOOP → [d.1] each list file → [d.2] Map to Download Ftp file → [d.3] Download Ftp files → [d.4] Read Large file → End LOOP → [e] end

(2) Flow Description: We will schedule an integration flow, which gets the ad hoc request from the caller, then list the files in an ftp location, do a loop over processing each file. Inside the loop we will download the files from Ftp to OIC’s file system and then read the contents of each file.

(3) Steps: Go to OIC console → Integrations → Create a Schedule Integration with your project name.

[a] Schedule:

We will submit ad hoc request. Nothing to configure here.

[c] List Ftp file:

We are going to put multiple input files to test the flow. List will list the details of input files. Use the existing Ftp connection created earlier.

[d] FOR Loop

[d.3] Download Ftp files

Use the ftp connection created earlier to download the file from Ftp.

This “Download file” option is handy for large file handling in OIC and can handle files up to the size of 1 GB.
This option allows files to be directly downloaded into OIC local file system without reading into memory.

[d.4] Read File Large

Here we are going to use the file reference obtained during download Ftp step and use it in stage activity, to read the file content.

Can create a sample ftpFile.csv having below content for defining structure and testing.

Id,Name,Band
001,AAA,6B
002,BBB,7A
003,CCC,6B

Flow:

Reposition activity if needed and should look like below.

Put 2 sample files “ftpFile_1.csv” and “ftpFile_2.csv” in source ftp path.

File content will be as highlighted during defining the csv structure above.

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

--

--

integratio

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