Page 1 of 1

Regarding rowmerger stage

Posted: Fri Jan 19, 2007 1:05 pm
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

Posted: Fri Jan 19, 2007 1:35 pm
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.

Posted: Fri Jan 19, 2007 1:53 pm
by DSguru2B
Do you have that new column in your target table?

Posted: Fri Jan 19, 2007 2:06 pm
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

Posted: Fri Jan 19, 2007 2:15 pm
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.

Posted: Fri Jan 19, 2007 2:41 pm
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

Posted: Fri Jan 19, 2007 2:52 pm
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?

Posted: Fri Jan 19, 2007 2:53 pm
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.