Skip to main content
Solved

string concatenation in Loop

  • July 30, 2014
  • 3 replies
  • 38 views

Hello,

 

 

I am reading shpae files and I would like to preapare a single string og particular attribute from shape file for all feature.

 

e.g. If shape file atrributes are

 

ID COUNTY_NAME POP

 

---------------------------------

 

1  ABC 100

 

2  XXX   1000

 

3  DEF   101

 

4  XYZ     500

 

 

I would like to prepare a string of COUNTY_NAME attribute of all features like

 

string = "ABC,XXX,DEF,XYZ"

 

 

How can I achieve this.

 

 

John

Best answer by takashi

Hi John,

 

 

I would use the Attregator transformer. Have a look at "Attribute to Concatenate" and "Separator Character" parameters of the transformer.

 

 

Takashi
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • Best Answer
  • July 30, 2014
Hi John,

 

 

I would use the Attregator transformer. Have a look at "Attribute to Concatenate" and "Separator Character" parameters of the transformer.

 

 

Takashi

takashi
Celebrity
  • July 30, 2014
correction for typo :-(

 

Aggregator

  • Author
  • July 30, 2014
Thanks Takashi. That worked well.