This may get difficult depending on what transformations you intend to do after transposition, because the attribute names won't be available to subsequent transformers in a dynamic scenario, even if they are on the feature.
One way to do so is to use an attributeCreator on the original data where the New Attribute is set to @Value(AttributeName) and the value to AttributeValue.
Then use the Aggregator in Merge Incoming Attributes mode with a group by on Equipment Id.
An alternate way is to use the Aggregator, generating a list with AttributeName and AttributeValue and then use the ListKeyValuePairExtractor from the hub to convert that to attributes.
In either case you will probably want the schemaSetter (hub transformer) in order to write out the data dynamically.
This may get difficult depending on what transformations you intend to do after transposition, because the attribute names won't be available to subsequent transformers in a dynamic scenario, even if they are on the feature.
One way to do so is to use an attributeCreator on the original data where the New Attribute is set to @Value(AttributeName) and the value to AttributeValue.
Then use the Aggregator in Merge Incoming Attributes mode with a group by on Equipment Id.
An alternate way is to use the Aggregator, generating a list with AttributeName and AttributeValue and then use the ListKeyValuePairExtractor from the hub to convert that to attributes.
In either case you will probably want the schemaSetter (hub transformer) in order to write out the data dynamically.
I tried the AttributeCreator - it seemed like a simple solution. I set it like this
It doesn't seem to do anything. The data comes out exactly the same as it goes in
I tried the AttributeCreator - it seemed like a simple solution. I set it like this
It doesn't seem to do anything. The data comes out exactly the same as it goes in
Because it's dynamic, the attribute name won't appear on the canvas (in FME 2020), however if you log or inspect the feature the attributes will be present.
I tried the AttributeCreator - it seemed like a simple solution. I set it like this
It doesn't seem to do anything. The data comes out exactly the same as it goes in
By inspect do you mean the inspection preview. If so it looks the same as the data going in.
The only difference I can see is I go from 1000 records to 999
What i'm actually trying to do is test whether a certain type of equipment has the correct attributes. So Equipment 5 should have 'Criticality', but it should also have 'Diameter'. Equipment 11 should have different attributes. My thought is transposing into columns i can test their existence and whether they are populated.
I also thought about converting each AttributeValue to a 1 then using AttributePivoter since the actual content is not important, just its existence. This also doesn't work. I use an AttributeManager to set the AttributeValue to 1 then run it through the Pivoter
It is set up like this
and the result is this
The group by is working but the rest isn't
I tried the AttributeCreator - it seemed like a simple solution. I set it like this
It doesn't seem to do anything. The data comes out exactly the same as it goes in
Inspect is using the Feature Information window - usually on the right
I'm not sure i'd pivot the data for what you're trying to do though. How do you have information stored on which attributes should be present for each equipment_id?
I tried the AttributeCreator - it seemed like a simple solution. I set it like this
It doesn't seem to do anything. The data comes out exactly the same as it goes in
Thanks - i can now see the transformer is doing what I thought I needed it to. Its not the solution to my problem but it is the solution to this thread