Skip to Content

.CSV to .txt using SFTP Adapter

Hi All,

I have requirement where I need to pick .csv file and convert it as .txt file using SFTP.

The below are the validations.

1.       Must be a pipe separated, .txt file

2.       Must have !##! At the end of every line in .txt file.

3.       Must be encoded via UTF-8 format.

4.       Need to avoid the first line from CSV i.e. function owner and department.


I am attaching source .csv file and expected target  .txt file.



Could you please help me on the requirement.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 21, 2015 at 02:05 AM

    Hi Vishnu

    You can achieve this by performing content conversion using MessageTransformBean in both sender and receiver channel. Refer to the following wiki for sample configurations.

    How To...Content conversion module with J2EE JMS adapter - Process Integration - SCN Wiki

    For item 3, PI by default handle content in UTF-8 format.

    For item 4, you can skip the first line by filtering it out in a mapping. Refer to my answer in the following thread.

    Rgds

    Eng Swee

    Add comment
    10|10000 characters needed characters exceeded