on 03-20-2009 6:25 AM
In the receiver communication channel, how do I put double quotes around the text fields for a CSV file output?
This is what I have in my file content conversion parameters:
<Structure>.addHeaderLine 0
<Structure>.fieldSeparator ,
<Structure>.enclosureSign "
<Structure>.enclosureSignEnd "
<Structure>.enclosureConversion YES
<Structure>.endSeparator 'nl'
I don't think I'm using the enclosureSign and enclosureConversion correctly because this configuration is not putting double quotes around the text fields in the CSV file output. Your help is much appreciated. Thanks!
>
> In the receiver communication channel, how do I put double quotes around the text fields for a CSV file output?
>
> This is what I have in my file content conversion parameters:
> <Structure>.addHeaderLine 0
> <Structure>.fieldSeparator ,
> <Structure>.enclosureSign "
> <Structure>.enclosureSignEnd "
> <Structure>.enclosureConversion YES
> <Structure>.endSeparator 'nl'
>
> I don't think I'm using the enclosureSign and enclosureConversion correctly because this configuration is not putting double quotes around the text fields in the CSV file output. Your help is much appreciated. Thanks!
Please note that the parameters enclosureSign and enclosureConversion etc are only for the sender adapter and will not work for the receiver file adapter.
in your case you will have to handle the double quotes as part of your mapping.
So when you map the required target text fields in the mapping, use a UDF or a simple concat logic to add quotes at the beginning and end of the value.
simple UDF logic;
//suppose your input to the UDF is input
String quotes = "\"";
String endresult = quotes + input + quotes;
return endresult;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Kristine ,
What i would suggest is you add the " that you want for every field in the graphical mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try like this........\"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.