Skip to main content
Solved

attribute split issue


gis2020
Contributor
Forum|alt.badge.img+5

Hi All,

I am trying to split the attribute in the text string, which has old and new attributes with same id and then make selection for specific attributes like surface ,highway. Final action is to create the column for each split attribute . Attribute listed in the text string are different every time and not in sequence so i am not sure how i can create columns dynamically. screenshot of the input data

Tried solutions : I have tried to do this using the attribute splitter and list expolder and then extracting attribute per columns but now i am getting too many columns for each id.

can somebody suggest ?

Best answer by markatsafe

@dandekarpriya thanks for including the small sample dataset. It's a big help to get a sample of data that contributors can experiment with.

I'm not sure what you want to do with the multi-part values turn - lanes:backward: left|right - so I split them on the last ':' -

turn:lanes:backward left|right

The workspace looks like this:

I've attached an example (FME 2019.2): splitattributes.fmwt

View original
Did this help you find an answer to your question?

4 replies

Forum|alt.badge.img+2

@dandekarpriya after your AttributeExploder try the AttributeCreator and in the New Attribute column use the Attribute Value option:

this allows you to take name/value pairs and create the attribute with the name. The new attributes won't appear in the workbench schema, but you should see them in the Data Inspector Feature Information Window.

 

If you attach a small sample dataset someone might make you an example workspace.

gis2020
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • April 15, 2020
markatsafe wrote:

@dandekarpriya after your AttributeExploder try the AttributeCreator and in the New Attribute column use the Attribute Value option:

this allows you to take name/value pairs and create the attribute with the name. The new attributes won't appear in the workbench schema, but you should see them in the Data Inspector Feature Information Window.

 

If you attach a small sample dataset someone might make you an example workspace.

@markatsafe i tried that but still i have attributes in different columns . here is the screenshot of the WB that i have.

 

Also i am attaching the data in zip file with name test data. test_data.zip


Forum|alt.badge.img+2
  • Best Answer
  • April 15, 2020

@dandekarpriya thanks for including the small sample dataset. It's a big help to get a sample of data that contributors can experiment with.

I'm not sure what you want to do with the multi-part values turn - lanes:backward: left|right - so I split them on the last ':' -

turn:lanes:backward left|right

The workspace looks like this:

I've attached an example (FME 2019.2): splitattributes.fmwt


gis2020
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • April 17, 2020
markatsafe wrote:

@dandekarpriya thanks for including the small sample dataset. It's a big help to get a sample of data that contributors can experiment with.

I'm not sure what you want to do with the multi-part values turn - lanes:backward: left|right - so I split them on the last ':' -

turn:lanes:backward left|right

The workspace looks like this:

I've attached an example (FME 2019.2): splitattributes.fmwt

Thank you @markatsafe.

I build something like this . attached is the screen shot of the same .


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