cancel
Showing results for 
Search instead for 
Did you mean: 

Sender file adapter dropping last column during content conversion

0 Kudos

I am trying to process a flat file with pipe delimited data, but when the last column of the file is empty the file adapter ignores the column, causing issues with the subsequent mapping program. For example, if the file contains the following data..

1||three|

... the converted content produced is...

<column1>1<column1>

<column2/>

<column3>three</column3>

My mapping is expecting that <column4/> also be delivered in order to function properly. The fields are all defined in record.fieldNames, and if there is any data present following the third pipe it is assigned correctly to the column4 element. I have also experimented with setting missingLastFields to "add", and tried explicitly specifying endFieldSeparator to 'nl' with no success.

Is there anyway to control this behavior in the communication channel, or is my only option to to account for it within the mapping by using mapWithDefault function for every field that appears at the end of a record?

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

/people/sukumar.natarajan/blog/2007/06/12/content-conversion-in-sender-file-adapter--2-new-useful-parameters missingLastFields should work for you.

Else can you paste the FCC parameters you have provided here?

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Did you find the solution? I have the same problem. missingLastFields does not work for me (XI 7.0). Is it the only way a check during mapping?

Thank you.

Nataliya

0 Kudos

Nataliya,

Ensuring that the element is populated during the mapping appears to be the only way to account for this. Therefore, whenever mapping the last column of a record set, I just made sure to use the MapWithDefault function in case the last field of the record is empty. It's a little extra manual effort, but it appears to be working fine so far. I was hoping for a better answer myself.

Former Member
0 Kudos

HI,

Make occurance of field as 0--1 and handle this issue into Mapping by comparing whether node exist or not.

Regards,

Manisha

Former Member
0 Kudos

you have to control the things in mapping