on 05-23-2007 1:26 PM
Hello All,
I have a CSV file in the below format.
a,b,c
And my content conversion works.
<1>a</1>
<2>b</2>
<3>c</3>
Sometimes I get the records in the file as
a,b,
My conversion is failing, I mean it give me file as
<1>a</1>
<2>b</2>
The last element <3></3> is not getting created.
I tried to use lastFieldsOptional its not working.
How can I achieve this.
Regards,
Hi SriHari ,
Please check with your CC parameters . Make sure that you have mentioned endSeperatot and fieldSeperator properly. If you have your structure repeating make sure that you have mentioned endSeparator
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sri Hari,
If you always get your source file as a,b,c then it will work fine. If you get as a,b it will not work because it doesnot match to the requirements. Since you said it is csv file then you should get the file as a,b,
So please check this. Also put the parameter lastfieldoptional to YES. Then it should work. Also can you tell us what you have specified in your content conversion parameters?
---Satish
Hello Satish,
I am getting the record as a,b,c or a,b, only.
And this is the content conversion I am doing.
Data.fieldSeparator ;
Data.fieldNames Dest_Plant,Product,WZone,WBin
Data.processFieldNames fromConfiguration
Data.lastFieldsOptional Yes
Data.missingLastFields Add
Data.additionalLastFields ignore
Regards,
Okay Satish I will give a last try to explain you my issue..
my CSV file is like this a,b,c,d
my conversion works fine so the xml is after conversion
<1>a</1>
<2>b</2>
<3>c</3>
<4>d</4>
Now few rows in the file may come as a,b,c, there is no d value it is blank.
so I expect the conversion to be now
<1>a</1>
<2>b</2>
<3>c</3>
<4></4>
like this, but what I am getting now is after conversion...
<1>a</1>
<2>b</2>
<3>c</3>
tag <4></4> is not getting created and my Outbound expects the XML to be in that format, so for this I tried to use lastfieldsoptional so that empty <4></4> tag is created but no luck...
This is what I want to do..
In the process even though <4></4> is not created File Content Conversion is successful and so Adapter Monitoring is showing success and my mapping fails.
Regards,
Hi SriHari,
Try to use fieldFixedLengths, if possible. I think it will work.
Why you need that empty field? for mapping or for other purpose?
If it is for mapping, you can check node existence before mapping the value.
If node does not exists, you can map constant to target field.
Please mention what you will do with that field, so that we can achieve that requirement in different way, if it is not possible with FCC.
Thanks,
Jyoths.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try to test it with 'space' in last field.
Regards,
Gourav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
First check it in mapping , have seen in mapping the last field,
if you have in mapping,then check it in the FCC parameters
fieldnames are given correctly or not??
Regards
Chilla
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Chandra,
Names are correct and everything works fine when I get the complete record. But when I donot have the last entry in the record row then its not creating the null element.
when record is
a,b,c then its creating xml
<1>a</1>
<2>b</2>
<3>c</3>
but when the record is a,b, instead then it is creating the xml as
<1>a</1>
<2>b</2>
I want it to be created as
<1>a</1>
<2>b</2>
<3> </3>
Regards,
Message was edited by:
SriHari Bandi
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
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.