Skip to main content

Hi,

I don't find out how to transpose a part of a simple data table.

I read a lot in the documentation and this kb about the AttributePivoter and AttributeTransposer transformers or other tips and tricks (with AttributeExploder and Aggregator) but I don't get to use these solutions with my test case.

Here is a (simplified) sample of my input data:

And here is what I want as output:

As you can see, the switch has to be done between the "type" and "month" attributes but I have to keep the student column.

I would really appreciate any help because I'm stuck...

Thanks,

Christian

This workflow might help you.


Hi Takashi,

You're fantastic !!

I reproduced your solution step by step and I don't really know how, but it works :)

I was very far from the solution so many many thanks !

Now, I try to understand this solution, I have particulair difficulties to understand the AttributeCreator parameters...but I will take time to analyze all this.

Best regards,

Christian


This workflow might help you.

Takashi,

 

I'm attempting to do a similar transpose with almost the exact same format as the example.

 

Could you explain why you created two field in the attribute creator, both labeled months?


This workflow might help you.

0684Q00000ArLa1QAF.png

Hi @mariofederis, it's just for better understandability and maintainability. This single expression should return the same result.

@Format(%02d,@Evaluate(@Value(_element_index)+5))-2018

Reply