Skip to main content
Solved

Generating several new attributes with value in name

  • January 10, 2022
  • 5 replies
  • 129 views

superjets
Contributor
Forum|alt.badge.img+1

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?

Best answer by takashi

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

bulkattributerenamer-aggregator

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • January 10, 2022

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

bulkattributerenamer-aggregator


geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • January 10, 2022

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.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • January 10, 2022

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


superjets
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • 3 replies
  • January 11, 2022

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.


takashi
Celebrity
  • 7843 replies
  • January 11, 2022

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