Skip to main content

Hi All,

I'm attempting to rearrange table A into table B using FME 2017.0.

A

B

I've followed FME's advanced manipulation of tables help, and i can get to this output (below) but i'm having a difficult time getting the premise ID in it's own column and bringing in the additional premise's info.

Any help would be greately appreciated.

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

Workspace:

Input CSV:

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

I don't have access to 2017 so I cannot see what it is you've done so far, but this workflow does what you need


I don't have access to 2017 so I cannot see what it is you've done so far, but this workflow does what you need

This works great. However, i'm still having some trouble getting from the aggregator output to a CSV writer. When I view the aggregator output in inspector, the D_% fields are separated as i'd like, but when I attempt to write from aggregator to CSV, the D_% fields are still comma separated and have no values. Of course, this makes sense, but I've tried using an attribute splitter and attribute manager to split out these fields, but I can't seem to get it to work. Any additional help would be much appreciated.

 

 

 


This works great. However, i'm still having some trouble getting from the aggregator output to a CSV writer. When I view the aggregator output in inspector, the D_% fields are separated as i'd like, but when I attempt to write from aggregator to CSV, the D_% fields are still comma separated and have no values. Of course, this makes sense, but I've tried using an attribute splitter and attribute manager to split out these fields, but I can't seem to get it to work. Any additional help would be much appreciated.

 

 

 

Possibly you have exposed a comma separated single name like "D_AREA,D_FLAT,D_IMPERV,D_PRCT,D_PRCTIM,D_RESPON"?

 

Make sure that the AttributeExpose parameters looks like this.

 

 


Would the AttributePivoter transformer be of help here?

Sounds like you are creating a pivot table.


Would the AttributePivoter transformer be of help here?

Sounds like you are creating a pivot table.

That's the first thing that came to mind for me too. It seems like it would, but I haven't gone down that path yet.
This works great. However, i'm still having some trouble getting from the aggregator output to a CSV writer. When I view the aggregator output in inspector, the D_% fields are separated as i'd like, but when I attempt to write from aggregator to CSV, the D_% fields are still comma separated and have no values. Of course, this makes sense, but I've tried using an attribute splitter and attribute manager to split out these fields, but I can't seem to get it to work. Any additional help would be much appreciated.

 

 

 

Make sure if the attribute names you have exposed are exactly match the values of "CHAR_TYPE_CD" read from the source CSV. Some CHAR_TYPE_CD values (e.g "D_AREA ") seem to contain trailing spaces.

 

 


Make sure if the attribute names you have exposed are exactly match the values of "CHAR_TYPE_CD" read from the source CSV. Some CHAR_TYPE_CD values (e.g "D_AREA ") seem to contain trailing spaces.

 

 

Haha, of course. Thank you @takashi, that was it.

 

 

The three attributes that were missing had trailing spaces in the source data. I used an attribute trimmer after the reader to fix the problem

 


Reply