I have lab data that is reported in rows, one row for each analyte for each sample.
I need to create a single record for each sample, with the analyte values as columns in the record - build a single record of analyte values for each sample.to this:
I have lab data that is reported in rows, one row for each analyte for each sample.
I need to create a single record for each sample, with the analyte values as columns in the record - build a single record of analyte values for each sample.to this:
@vcarr2005 Have a look at the article Transpose a Table Using FME.
Thanks Mark, that article explains transforming columns into rows. I want to do the opposite - build columns out of rows using a unique ID.
Thanks Mark, that article explains transforming columns into rows. I want to do the opposite - build columns out of rows using a unique ID.
First you will want to add a column that gives the column names you want to use, e.g. I presume the value alongside Perfluorobutanoic acid (PFBA) will want to end up in a column called PFBA.
Then you'll want to create a new attribute using the value of AnalyteName and setting it's value to the appropriate column (Result?)
The new attributes will be created but hidden at this point, so you'll need to expose them using an AttributeExposer. Finally you need to aggregate the data to a single row, ensuring that you select Merge Incoming Attributes under accumulation mode. If you have data for multiple samples you will need to choose an appropriate attribute to group by here.
Thank you, this is exactly what I needed.