cancel
Showing results for 
Search instead for 
Did you mean: 

Content conversion in sender adapter.

0 Kudos

Hi,

I have a problem with the content conversion in sender adapter.

I need only process the csv file with the exact number of columns containing the structure, if the csv file contains more o less columns in the csv file, I want that this files are not relayed by the adapter and remain on the server.

Thank you very much for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ferran,

This can be achieved at mapping level. You need to check the number of columns that are comming in the file using Count function. If the number of count is equal to the value specified then will process the message else raises a mapping exception.

Thanks,

Former Member
0 Kudos

@ Hareen

This can be achieved at mapping level. You need to check the number of columns that are comming in the file using Count function. If the number of count is equal to the value specified then will process the message else raises a mapping exception.

Are you talking about "count" function in the message mapping? that function won't count the number of fields / columns, but would count the number of occurrence of a particular field.

Answers (2)

Answers (2)

stefan_bosshard2
Explorer
0 Kudos

Hi Ferran,

to achieve your requirement I suggest you to develop an adapter modul which first count your entry within csv file, if it fits your quantity go ahead...

Regards

Stefan

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi,

Using standard adapter you can't count records in CSV file

Create interface read files in to PI , in Maping level count how many records present i s source data, it is correct count then data to target else send data to same file location with dofferent file name to differentiate.

Regards,

Raj