on 02-27-2012 2:52 PM
Hello,
I have a flat file with many records.
The last one contains "OK" and not need to be process.
How can I managed this in PI.
For the moment, I have this error :
ERROR Converting document line no. nnnn according structure
Thnaks for your help
Edited by: jconderbeke on Feb 27, 2012 3:53 PM
Hi,
If you can identify some keyfield in your data records which is other than "OK" then you can mention the key field value in your FCC parameter.
So all the lines which has keyfield value same as mentioned in the config will be processed .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After picking up all the records, you might want to handle filtering out last field using mapping. That is one possible way.
Also if the field length is fixed then you might want to try using the following parameters.
Example
element.fieldnames
element.fieldfixedLengths
element.fixedLengthTooShortHandling:Cut
Hope this will solve your problem
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I have added the record.fixedLengthTooShortHandling:Cut I have received the following error :
"Conversion of file content to XML failed at position 0.....
Error converting document line no. 33 according to structure 'record'
Consistency error: field(s) missing - specify 'lastFieldsOptional' parameter to allow this
When I put record.'$lastFieldsOptional:YES
I have the following error : The Content of element'record' is not complete. One of '' is expected.
Do you know where can I put a check on the value of this field in the mapping or interface determination.
Thanks a lot
After checking the payload, I have seen that I have at the end the following thing :
<ns:File xlmns:ns="http://world.com/file">
<record>
...
</record>
....
<record>
...
</record>
<record />
</ns:File>
Can someone explain me how to avoid to have this last <record/>, or checking it in mapping ?
Thanks a lot
Edited by: jconderbeke on Feb 28, 2012 12:31 PM
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.