Tuesday, 10 May 2022

Stage File in OIC

Stage File is the activity in the OIC. It allows you to work with files. 

You can perform the below operations with the help of Stage File activity in OIC

  • Read the Entire File
  • Read Files in Segment
  • Write File
  • ZIP Files
  • UnZIP File
  • Encrypt File
  • Decrypt File
  • List Files
Let's see each operation
1. Read Entire File: This operation will read the complete files from the internal OIC temp location. This operation will be helpful when the file size is small

You can read the file with a file reference or without a file reference.
When using file reference no need to specify the file name and directory.

Here he will see reading the files without file reference so you need to specify the file name and directory

Optionally you may remove n no of lines while reading the file from the end. If you want to remove the lines from the beginning and you enter -1, -2, or -n it will simply ignore and none of the lines will be removed.

While reading the file you may also decrypt the file but you have to select the PGP keys that you have imported into the certificate section under the setting.



As you are reading the file's lines so provide the structure of the file by choosing any one of the choices below
  • Sample delimited document (e.g. CSV)
  • XML Schema Document (XSD)
  • Sample XML Document
  • Sample JSON Document
  • EDI Document
 Based on the above option schema of the file will be generated.

2. Read Files in Segments: This operation is exactly the same as reading the entire file operation only difference is, that it will read files in the chunk of 200 records

This read file will be read based on references as below

The structure for the file's content will always be yes in case of reading entire files or reading files in segments in stage file.

You have to define the structure of the file in the same way that you did for the reading entire file.




As soon as you define the stage by reading the entire file it will generate the scope to process the chunks of the records separately

Request to read the file in the segment will be like below and it will contain the worker request having some parameters


Note: You should not assign the node which returns multiple nodes otherwise error message will be like below



3. Write File: This operation will allow you to write the file internally on the OIC temp server location.

You have to provide the filename and directory along with the file content structure.

For writing, the file mapper will be generated in stage file action.




4. Zip File: This operation will let you zip the files. To zip, you need to specify the zip file name and directory which you want to zip. You have to also define which folder you want to put zip file

5. UNZip File: This operation will unzip the files from a provided location and parameters will be exactly the same as the zip file like file name, zipped folder location, and output folder location


6. List Files: This operation will return all the files available in the temp location or location that you have provided

Encrypt and decrypt operation will be published soon

No comments:

Post a Comment