Regarding rowmerger stage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Regarding rowmerger stage

Post by vijaykumar »

Hi Gurus,

My design is ODBC---->ROWMERGER----->ODBC.

My source table has columns

deptno, loc,dname.

In Row merger stage properties.

General i have selected multiple lines.

In o/p Columns tab, i have created a new column called merged column.
Name type length
merged column unknown unknown

when i compile the job it says column merged has unknown datatype.Then i changed the datatype of merged column to varchar.

when i run the job iam getting error.
dileep..ODBC_2.DSLink6: DSD.BCIOpenW call to SQLColAttributes(mergedcolumn) failed.
SQLSTATE=24000, DBMS.CODE=0
[DataStage][SQL Client]Invalid cursor state.
please help me.
cheers;
vijay
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

This what the rowmerger stage does:
DSOnlineHelp wrote:The row merger stage reads data one row at a time from an input link. It merges all the columns into a single string of a specified format. It then writes the string on a given column of the output link. The stage can have a single input link and a single output link.
What is your target table and its metadata? Do the target table and field exist?
I just tried a job with:

Code: Select all

ODBC ----> ROW_MERGER -----> SEQUENTIAL_FILE
and it ran without any issues and did what is expected out of row_merger stage.

Whale.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Do you have that new column in your target table?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

Hi Guru,
Thanks very much.
when i used sequential file instead of ODBC in the target stage, its working fine.
source columns
deptno, dname, loc.

target column is merged column.

In the sequential file properties.
I have checked firstline is column names and Omit new line.

I defined targed column name as merged column manually.
merged column varchar 29.

When i try to view the data from my target stage(sequetial file), Though iam able to view the data, but iam getting one warnings.

i also want to separate all the columns by delimeter (,). How is this possible.

Warning: invalid quotes nls_read_delimited row1 merged column().

cheers;
vijay
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

As far as I know your delimiter (in the merge stage) is not compatible with ur input data. Try using Pipe first and then when it works we can later replace it with comma, Also check whther ur input data has quotes in it. If yes then I am not sure how the Merge stage will handle that kind of data.

Guru , Please correct me if I am wrong.
vijaykumar
Participant
Posts: 228
Joined: Tue Oct 03, 2006 7:08 pm

Post by vijaykumar »

Hi Gurus,
I tried by selecting using named pipes in my target sequential file stage.
It doesn't extract the data at all.
My source data is the default Dept table in Oracle database.
Please help me in analyzing the error.

cheers;
vijay
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

Named pipes belong to the UNIX domain. A pipe "|" de-limiter is different from "Named Pipes". What are the delimiter and quote character specified in your target sequential file?
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Row merger stage gets all the columns and puts them together into a single string and spits it out to the 'merged column'. If you want the each row to be concatenated to a single output row then and only then check the 'multiple lines' option under the general tab. If you just want to merged columns together and keep each row seperate then uncheck it.
Go ahead and uncheck the 'multiple lines' option. Specify pipe as your delimiter, quote character as 000.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply