Page 1 of 1

Combining rows into a single row

Posted: Sat Aug 08, 2009 5:58 am
by datisaq
In Datastage parallel edition, how can we combine the rows coming from the input link into a single row. Say for example:-

I/P:-

COLA
---------
A
B
C
D

O/P:-

COLB
-------
ABCD


It sounds something like vertical pivoting but here the number of columns at both ends are equal..

I'm having only one column at the input but at the output the coulmn length should be very large to accomodate all the records.

Any help will be appreciated greatly..

Posted: Sat Aug 08, 2009 7:02 am
by Sainath.Srinivasan
Wonder why someone will need to do that.

Especially if there is only one column.

The options are
1.) if output is seq file, write with rec delim as none.
2.) if source is seq file, you can remove newline using unix utilities.

Posted: Sat Aug 08, 2009 8:19 am
by datisaq
Thanks for the help i got it..

Posted: Fri Aug 21, 2009 12:09 pm
by Subhajit
Sainath.Srinivasan wrote:Wonder why someone will need to do that.

Especially if there is only one column.

The options are
1.) if output is seq file, write with rec delim as none.
2.) if source is seq file, you can rem ...
hey yar try to giv the answer okies.

Posted: Fri Aug 21, 2009 12:15 pm
by Sreenivasulu
Subhajit,

Pls reply in proper professional language.


Regards
Sreeni

Posted: Fri Aug 21, 2009 1:51 pm
by ds_teg
cat filename | tr '\n' ' '

Posted: Fri Aug 21, 2009 1:52 pm
by ds_teg
cat filename | tr '\n' ' '