Skip to main content
Question

Bulk attribute rename and sum values of duplicate attribute names


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.

 

 

3 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • August 14, 2020

Struggling to think of a non python solution


arnovananrooij
Contributor
Forum|alt.badge.img+5
ebygomm wrote:

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+39
  • Influencer
  • August 14, 2020
arnovananrooij wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings