Solved

Generating several new attributes with value in name

  • 10 January 2022
  • 5 replies
  • 9 views

This has been asked before, at least here and here.

 

The problem is best described in the picture, with the starting point on top and desired outcome below. The data is huge, so manual attribute creation is not an option, the attributes should be generated like "Year@Value(number)" and "Explanation@Value(number)"

ExampleI have tried the method used in these, with AttributeCreator with every option I can imagine, but to no avail. I've used it in conjunction with AttributeExposer, but without any good outcome.

 

Dear all, is there a solution to this?

icon

Best answer by takashi 10 January 2022, 14:33

View original

5 replies

Userlevel 2
Badge +17

Hi @superjets​ , if I understand your requirement correctly, the combination of BulkAttributeRenamer and Aggregator in this workflow does the trick.

bulkattributerenamer-aggregator

Userlevel 4
Badge +36

Interesting use of the BulkAttributeRenamer!

You will still have to enter all the attribute names you want to expose in the AttributeExposer (like Year1 and Explanation1). This can be simplified by importing a file with those attribute names. This file can be created outside of FME.

Userlevel 1
Badge +21

Interesting use of the BulkAttributeRenamer!

You will still have to enter all the attribute names you want to expose in the AttributeExposer (like Year1 and Explanation1). This can be simplified by importing a file with those attribute names. This file can be created outside of FME.

If you are using 2020 or above, you can use cached data to populate the AttributeExposer

image

Hi @superjets​ , if I understand your requirement correctly, the combination of BulkAttributeRenamer and Aggregator in this workflow does the trick.

bulkattributerenamer-aggregator

THANK YOU TAKASHI AND OTHERS

This works.

I would have never thought about this solution, I was completely stuck with AttributeCreator, which might have done the trick, but this is a very good solution.

You do great work, this is my first own question here, but I have found help at least hundred times before.

Userlevel 2
Badge +17

THANK YOU TAKASHI AND OTHERS

This works.

I would have never thought about this solution, I was completely stuck with AttributeCreator, which might have done the trick, but this is a very good solution.

You do great work, this is my first own question here, but I have found help at least hundred times before.

You can use two AttributeCreators to do that as well (see the attached screenshot), and JSON operations can also be applied, but I think the BulkAttributeRenamer use is the most elegant way in this case.attributecreator-x2-aggregator

Reply