Page 1 of 1

Metadata not found in Reject link of Odbc Connector Stage

Posted: Wed Feb 15, 2012 1:49 am
by partheev123
Hi,

I am working on DataStage 8.5 . In my requirement I am using odbc connector stage(Sql Sever DB) as a Target where I need to reject records that fail while loading data due to constraint violation etc. To perfom this I created a reject link and linked to a sequential file, but I am not able reject the records that fail. Also I couldn't see metadata in the column definations tab of the sequential file.

I tried the same scenario with odbc enterprise stage and it worked as I see a additional field "sqlcode" got populated in the reject link which have the error code.

Can you please let me know how to capture reject records along with error code using odbc connector stage?

Thanks.

Posted: Wed Feb 15, 2012 2:10 am
by kandyshandy
Once you open the connector stage, stare at it for few mins and you should find an image... play with that image with your mouse ;)

Posted: Wed Feb 15, 2012 3:19 pm
by ray.wurlod
Within the ODBC Connector stage click on the reject link in the picture frame. Some options will be presented.

Posted: Wed Feb 15, 2012 10:43 pm
by partheev123
Thanks for the quick responses! :)

Based on your suggestions I am able to add Error Code and Error Desc fields to the metadata of the reject link but could n't see the actual fields from the odbc connector stage (Target).

Is there any way we can get all fields from Odbc connector Stage in the reject link as well as we need to populate actual fields along with error code and error description in the reject file :?:

Posted: Wed Feb 15, 2012 11:35 pm
by kandyshandy
Are you doing ok?

You will see those fields by default. Infact, you can't avoid them ;) Just look at the right place!

Posted: Thu Feb 16, 2012 6:49 am
by partheev123
Kandy,

That's what I thought they should appear by default in the reject link.

I looked in both reject tab of odbc connector stage and input column definations of sequential file (which is used to capture the rejects) and found RejectERRORCODE and RejectERRORTXT fields only.

Interestingly, when I linked the reject link to Peek stage and by enabling RCP I am able to see the columns get propagated in the director log. So I tried the same RCP enabling concept with sequential file as reject but could not get the fields from target stage instead I only see the two reject description fields.

Do I need to add any additional setting (may be environment variable) to see the fields from target stage in the reject link?

Posted: Thu Feb 16, 2012 3:07 pm
by ray.wurlod
You won't ever see them there. They are automatic, and not to be edited. You will see them at the other end of the reject link (in your specific case, in the Peek stage).

Posted: Thu Feb 16, 2012 11:19 pm
by kandyshandy
Partheev,

I doubt. I did spend a minute to check this out.

Connected a transfomer -> ODBC Connector -> Seq file (Reject Link).

After defining few dummy columns in ODBC connector, i see them automatically under "columns" tab of Reject link. I see them in the target seq. file as well.

Posted: Fri Feb 17, 2012 6:53 am
by partheev123
Kandy/Ray,

Appreciate all your help and thanks for researching further in the issue. But unfortunatley even though my job have the same design as Kandy's (specified in the post) I am not able to see the columns in the sequential file (reject link).

Do you think we need to install any fix pack to resolve this issue?

Posted: Fri Feb 17, 2012 7:10 am
by qt_ky
I think that is normal (not to be "fixed" in any fix pack).