random student
random student

Reputation: 775

how to insert new rows only ibm datastage

I'm trying to insert new rows only, i already tried with the insert new rows only in write mode options for the JDBC stage, but it doesn't work, it also inserts the old rows too. Maybe this is because in the column table i have id and created_at (getdate()) so although the rows of the old file already inserted, the db assumes it's new because of the id and created_at will be different each time i run the job. How do i insert only new rows only (that has not been stored in the database) of the excel to the database ignoring the id and created_at columns?

Upvotes: 0

Views: 1435

Answers (1)

Ray Wurlod
Ray Wurlod

Reputation: 851

Typically you would perform a lookup against the target table in DataStage, and proceed to insert only if the lookup fails (via the Reject output of the Lookup stage).

Upvotes: 1

Related Questions