Skip to main content

Hi,

I have this data below which I would like to transform into a single record per row.key. How do I do it?

Ideal output would be 2 records with field.name converted to columns.

Cheers

I would typically create a new attribute using the field.name value and set it to the value of field for each record. Then expose these attributes and then aggregate based on row.key. This assumes you know all possible field.names to expose

e.g.


I would typically create a new attribute using the field.name value and set it to the value of field for each record. Then expose these attributes and then aggregate based on row.key. This assumes you know all possible field.names to expose

e.g.

Yep, that is the best way I'm aware of. I'd make the minor additional suggestion to tell the Aggregator NOT to assemble any geometry (the Mode -- set it to Attributes Only) -- that will save it some work.

 

 


I would typically create a new attribute using the field.name value and set it to the value of field for each record. Then expose these attributes and then aggregate based on row.key. This assumes you know all possible field.names to expose

e.g.

awesome stuff! thanks!

 

 


In relation to this one, Given the xml below

emp-record-sample.xml

I get this after XML Fragmenter

 

Is there a way that after it goes through the aggregator it concatenates the field.name "GIVEN_NAMES" into a single column? Or is it better to edit the XML and change one of the "GIVEN_NAMES" into say "FIRST_NAME" so I could exppose them separately?

Right now, I am getting this one below after AttributeExposer and just ignores the 2nd Given Name after going through Aggregator.

TIA


I would typically create a new attribute using the field.name value and set it to the value of field for each record. Then expose these attributes and then aggregate based on row.key. This assumes you know all possible field.names to expose

e.g.

I often use the BulkAttributeRenamer, rather than the AttributeCreator. FYI.

 

 


Reply