Skip to main content
Solved

string concatenation in Loop


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
View original
Did this help you find an answer to your question?
<strong>This post is closed to further activity.</strong><br /> It may be a question with a best answer, an implemented idea, or just a post needing no comment.<br /> If you have a follow-up or related question, please <a href="https://community.safe.com/topic/new">post a new question or idea</a>.<br /> If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Evangelist
  • 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
Evangelist
  • July 30, 2014
correction for typo :-(

 

Aggregator

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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings