My input sequential file has only one varchar column.
My requirement is,if the record is "abcde",
then it should be loaded as [a][c][d][e].
The length of the record is not fixed.
It may vary. if the input is "123" then the result should be [1][2][3].
One way i can think of is,using the below in filter command:
In 8.5 You could use a loop variable in the transformer to do this. But before that I would bet that everything You could do in a transformer will be too much effort to think of anything else than Your mentioned solution.
If the length of Your column was never longer than Varchar(5) You might think of using stage-variables (one per position in the string) and concatenate the results. But I would not prefer that, really.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
let us consider 20. So based on the length we need to split and enclose [] in transformer.
That's complex than the filter command method.
However thanks for your inputs.
qt_ky wrote:Take the caret symbol ^ out of your sed command or else it will only act on the first character of each line. You can do it like this also: