Reject link from ODBC connector stage causes error

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
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Reject link from ODBC connector stage causes error

Post by suse_dk »

Hi -

On my database table I have a unique key, and when I write to the table I want to catch the records which fails to be inserted due to a key violation with a reject link from the ODBC connector.

However when records are rejected the job fails with the following error:
[IIS-CONN-DAAPI-000045] Can not convert to framework type timestamp (CC_PXAccessor::setCalendar, file CC_PXAccessor.cpp, line 4,137)
The job without unique key on the table runs without warnings and inserts all records in the table.

The data contains several timestamps extended with microseconds (unbound in length and scale) and it writes to a datatime2(7) on SQL server.

I have tried all possible settings for the reject link from the connector, but the job keeps failing, and I can't figure out why...


Any ideas??

Thanks
_________________
- Susanne
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

Bonus info: the timestamp columns are nullable

It seems that when a NULL is present in one of the timestamps columns then the "sql code" reject link crashes.

My workaround so far is to give a default value in a transformer before the ODBC connector and the use a after SQL to update the records with default timestamp values to NULL.

If anyone has a better solution I'll be happy to hear it.
_________________
- Susanne
Post Reply