Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
As shown in image below, here is my input excel.I want output as below:
Here is my tMap:
From the input excel, depending on the current quarter, I want to choose 3 columns. In the example given, I have shown I want to choose Apr, Mar, Jun i.e. Q2. However, in case of Q3, I need to choose Jul, Aug, Sep. Let's assume, I have 3 context variables that hold the month name depending on quarter.
context.month1="Apr-2019"
context.month2="May-2019"
context.month3="Jun-2019"
So, for this example, I want below mapping in tMap, as the three context variables contains those months:
C4 --> M1
C5 --> M2
C6 --> M3
However, this has to be dynamic; In the next quarter, it will be other set of 3 columns i.e. C7, C8, C9
Essentially, I want to remove those columns that are not required for current quarter.
I am using Talend Open Studio 7.2.1. Cannot use licensed version.
Any ideas appreciated. Thanks.
Hi,
Below blog describes about dynamic processing of data. It is not exactly same use case but it can give you an overall idea.
https://www.talend.com/blog/2019/10/31/magically-shuffle-columns-talend-dynamic-schema/
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved