Skip to main content
Question

Bulk attribute rename and sum values of duplicate attribute names

  • August 14, 2020
  • 3 replies
  • 46 views

arnovananrooij
Contributor
Forum|alt.badge.img+5

Hi community,

I have a very complex challenge. I have a csv with an unknown set of (dynamic) attributes. I was asked to rename the attributes so everything from the dot is removed. That is very easy I would say with the BulkAttributeRenamer (BAR), but then I found out I get duplicate attribute names and this is not allowed in the BAR. I asked what to do with these duplicates and they said I have to sum the attributevalues if there are duplicates.

So for instance I have and attribute xxx17.1 and xxx17.2 the result must have an attribute xxx17 and the values have to be summed. This is no problem with a fixed schema, but I have a dynamic one and I have no idea how to do this. I have attached an example csv. All ideas are welcome.

Thank you.

 

 

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.

3 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • August 14, 2020

Struggling to think of a non python solution


arnovananrooij
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • 73 replies
  • August 14, 2020

Struggling to think of a non python solution

I have no experience with python so I hope you can find a non python solution.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • August 14, 2020

I have no experience with python so I hope you can find a non python solution.

Have you already got a method of defining the dynamic schema? I think an Attribute Exploder can probably work here

Capture