Send a asymmetric/heterogeneous file to sFTP in OIC
How to send a asymmetric/heterogeneous file into sFTP in OIC?
In this post I have explained how to write a asymmetric or heterogeneous file to sFTP in OIC. Heterogeneous file means the file contains different columns in header, body and footer sections. e.g.
Steps overview -
- Create the file stage write for each type of row in the file one by one in append the existing file mode.
- Use a broken sample file for each type of row in the file i.e. one file each for each section of the records in the file.
- Finally use the file reference from the final stage write file to send the entire file to the required sFTP location.
# Hands On Practice :
Use Case : Lets develop a simple schedule orchestration integration to write a heterogeneous file in a sFTP location.
Step1: Create a scheduled orchestration vis HeterogeneousFileWrite.
Step 2: Add a stage write activity with the first type of record i.e. header record in the sample file and map the desired values.
Step 3: Add second stage write activity in append mode with the second type of record i.e. header-body record in the sample file keeping the filename and output directory same and map the desired values.
Step 4: Add third stage write file activity in append mode for the third type of record i.e. second-type-body record in the sample file keeping the filename and output directory same and map the data as per requirement.
Step 5: Add the forth stage write file activity in append mode for the footer record keeping the filename and output directory same and map the data.Step 6: Now add the sFTP adapter connection to write the final file in the required sFTP location without defining the file structure.Step 6.1: Map the the last stage file write response element i.e. FooterResponse/FileReference to sFTPFileWriteRequest/FileReference.Step 7: Activate the interface and submit the request to run the interface. Go to the sFTP location and check the generated file for the desired heterogeneous structure and data in the file.
Comments
Post a Comment