I’m importing a csv file that has a column Month with the value “2015/3”.
What I want to do is convert it to 201503, however a simple replace of “/” with “0” won’t do since Oct, Nov and Dec have 2 digits and the output will be 2015012 and I want to keep the same length. Desired for Dec will be 201512.
My first approach was to use reformat component and add a new field in the metadata output called Processed_month set as string.
Under transformation I’m trying to use some sort of conditional clause like below:
The clause you are trying to carry out is correct, what is missing is the output port that is mandatory if you want to forward the result to the next component :
Yes, you can use both codes in the transformation component as you have probably already tested. Just reminding that you have to specify the output port and metadata field.