Metadata not found in Reject link of Odbc Connector Stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
partheev123
Premium Member
Premium Member
Posts: 20
Joined: Sun Dec 20, 2009 10:46 pm

Metadata not found in Reject link of Odbc Connector Stage

Post 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.
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post 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 ;)
Kandy
_________________
Try and Try again…You will succeed atlast!!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Within the ODBC Connector stage click on the reject link in the picture frame. Some options will be presented.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
partheev123
Premium Member
Premium Member
Posts: 20
Joined: Sun Dec 20, 2009 10:46 pm

Post 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 :?:
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post 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!
Kandy
_________________
Try and Try again…You will succeed atlast!!
partheev123
Premium Member
Premium Member
Posts: 20
Joined: Sun Dec 20, 2009 10:46 pm

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post 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.
Kandy
_________________
Try and Try again…You will succeed atlast!!
partheev123
Premium Member
Premium Member
Posts: 20
Joined: Sun Dec 20, 2009 10:46 pm

Post 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?
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I think that is normal (not to be "fixed" in any fix pack).
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply