The first step will be to get the values into the various attributes. Use an AttributeCreator with NewAttribute set to @Value(_attr_name) and Attribute Value set to _attr_value.
Use an AttributeExposer to expose all the attributes to make it easier to continue with.
The next step is to group them together, there are a number of ways to do this, one is to add a counter and calculate the modulus of 6 on that.
Then use an Aggregator grouping by that modulus to join them into records.
Let me know if you want a sample workspace.
The first step will be to get the values into the various attributes. Use an AttributeCreator with NewAttribute set to @Value(_attr_name) and Attribute Value set to _attr_value.
Use an AttributeExposer to expose all the attributes to make it easier to continue with.
The next step is to group them together, there are a number of ways to do this, one is to add a counter and calculate the modulus of 6 on that.
Then use an Aggregator grouping by that modulus to join them into records.
Let me know if you want a sample workspace.
Hi,
Thanks for your reply!
I've been trying to use your example above like the linked example philipwhitten posted below before I decided to write a question but I didnt manage to make it work though. The problem is that the input reader in excel format can vary because this script will be used in FME server app and the user can choose what excelfile to use every time they run it. Please see the picture attach in the post where the relevant reader and transformers are marked with a red pencil.
Hi,
Thanks for your reply!
I've been trying to use your example above like the linked example philipwhitten posted below before I decided to write a question but I didnt manage to make it work though. The problem is that the input reader in excel format can vary because this script will be used in FME server app and the user can choose what excelfile to use every time they run it. Please see the picture attach in the post where the relevant reader and transformers are marked with a red pencil.
My ideas were based on a static format for the input so if that is changeable it will be more complicated. I'll have to have a think about it some more. Maybe a DuplicateFilter first to get all the attribute names and then do something with that....
Hi,
Thanks for your reply!
I've been trying to use your example above like the linked example philipwhitten posted below before I decided to write a question but I didnt manage to make it work though. The problem is that the input reader in excel format can vary because this script will be used in FME server app and the user can choose what excelfile to use every time they run it. Please see the picture attach in the post where the relevant reader and transformers are marked with a red pencil.
I use an attributeexploder to extract all the values from the excelfile and then I used tester to filter out format attributes and kept all relevant attributed through the failure output in the tester transformer (see the picture above). So this part is already solved. I just need to transpose them correctly.