Thank you very much for your response. I have tried the same way and able to get the expected output.
Thank you once again..
As long as there's a maximum number of characters to append (let's say, 250), this can be done with an Expression transformation.
Let's assume the input string is named VALUE and the total length is named TOTAL_LENGTH.
Then you will need the following additional ports in the EXP:
- one variable port v_length, type Integer, with this expression term:
- one variable port v_pad_val, type String (250), with this expression term:
LPAD( SUBSTR( VALUE, 1, 1), 250, SUBSTR( VALUE, 1, 1))
- one output port REPEATED_VALUE with this expression:
SUBSTR( v_pad_val, 1, TOTAL_LENGTH)
Again, this approach requires that the maximum repetition of the input character is known in advance (because you have to set the length parameter in LPAD() to that value).
You might able to achieve it using an expression and converting the integer to string and then using lpad function.