I have a query on the DB2/UDB stage while loading into it with "Write" method.
1: Is the job going to failed if the same record already exist in the table?
2: If yes, Is there any option to ignore this inserting failure with 'Write' method?
3: Is it the same case with DS8 version as well or DS8 treat this differently?
DB2 stage Write method
Moderators: chulett, rschirm, roy
I'm not following your question. The DB2 stage has a selection for which "Write Mode" you want to use. Insert, Update, Delete, Insert then Update, etc...
Are you concerned that it will error due to table constraints? If so then use an Insert then Update method OR if the table isn't too large join your input records to your table and then just insert those that do not match then do what you will with the others whether it be trash them or update existing.
Are you concerned that it will error due to table constraints? If so then use an Insert then Update method OR if the table isn't too large join your input records to your table and then just insert those that do not match then do what you will with the others whether it be trash them or update existing.
Let me re-write my point
Lets there are some records coming from source which already exist in target table. I need only insert in the target table (not update).As DS dont have that feature to only insert so i used
Write method as UPSERT and in Update sql doing something like "1=2" so that it will not be update (as part of my need).
Now question arise, as 1=2 will do a full table scan, can i use a reject out of the DB2 target stage so the records already
present in target will be get rejected and i dont have to scan whole table as well
As this is an existing job i dont want to change the design in major(by putting look up....)
Lets there are some records coming from source which already exist in target table. I need only insert in the target table (not update).As DS dont have that feature to only insert so i used
Write method as UPSERT and in Update sql doing something like "1=2" so that it will not be update (as part of my need).
Now question arise, as 1=2 will do a full table scan, can i use a reject out of the DB2 target stage so the records already
present in target will be get rejected and i dont have to scan whole table as well
As this is an existing job i dont want to change the design in major(by putting look up....)
-
- Participant
- Posts: 11
- Joined: Sat Feb 10, 2007 12:32 am