Answers for "how to put quotes around stings when feature writer writes a csv?" https://knowledge.亚搏在线safe.com/questions/83962/how-to-put-quotes-around-stings-when-feature-write.html The latest answers for the question "how to put quotes around stings when feature writer writes a csv?" Answer by erik_jan https://knowledge.safe.com/answers/83990/view.html

The Parameters for the CSV writer in the FeatureWriter contain these to add quotes to the output values:

Fri, 07 Dec 2018 14:12:15 GMT erik_jan
Answer by takashi https://knowledge.safe.com/answers/83989/view.html

If you need to always quote the 1st and the 2nd columns, you can easily do it using the StringConcatenator with the Overwrite Existing Attributes option, like this.Assuming attribute names for the 1st and the 2nd columns are "attr1" and "attr2".

Fri, 07 Dec 2018 13:57:26 GMT takashi
Answer by nicholas https://knowledge.safe.com/answers/83966/view.html

I solved it by switching the FeatureWriter from Format: CSV to format Test File

I used Attreibute creator to concatenate three columns into one (text_line_data) with " and , exactly where I want them.

I also used a Creator and AttributeManager to create the column names (separated by commas) as the first line

So, my solution was to avoid the csv writer and use the text file writer instead.More work, but far more control.

What I would really like is for the CSV writer to allow the quotes to be set on a column by column basis

Fri, 07 Dec 2018 02:20:23 GMT nicholas
Answer by danilo_fme https://knowledge.safe.com/answers/83964/view.html

Hi@nicholas

I re-criated here your case with theAttributeCreator:


After, the transformerAttributeSplitterto split in ",". The list of attributes was created:

_list{0}

_list{1}

_list{2}


I concatenated withStringConcatenatorusing this configuration:

"@Value(_list{0})","@Value(_list{1})",@Value(_list{2})





Thanks,

Danilo


Fri, 07 Dec 2018 01:13:48 GMT danilo_fme
Answer by nicholas https://knowledge.safe.com/answers/83963/view.html

I tried StringReplacer and it does not work

Fri, 07 Dec 2018 00:34:59 GMT nicholas