Page 1 of 1

Appending Data to Oracle Table using Enterprise Stage

Posted: Sun Oct 24, 2010 9:01 am
by RaviReena
I need to append data to existing Oracle Table with primark Key(Column1+Column2) using Oracle Enterprise Stage and the source is flat file,but i need to drop the records when i am appending the records when the primary key is already existing in the table.
What is the best way to design this scenario?
Any suggestions greatly appreciated.

Posted: Sun Oct 24, 2010 12:20 pm
by swapnilverma
You can use reject link to capture records failing with unique key constrain .... perform delete and then insert ...



hope this help ?

:)

no delete is required.

Posted: Sun Oct 24, 2010 1:05 pm
by RaviReena
I do not want to delete the existing records, just append the new record and if the key exists just drop the record.Since we are using Index Rebuild option, it is is inserting all rows and failing to build the indexes.
Can we use any other design approach to skip the records upfront, before coming to Oracle Enterprise stage?

Posted: Sun Oct 24, 2010 5:34 pm
by chulett
Then you need to not send them to the target, and that would typically mean a lookup against the target and only pass the records that 'fail'. Assuming your duplicates are not in your load data, that is.

Re: no delete is required.

Posted: Sun Oct 24, 2010 11:25 pm
by swapnilverma
Than u have to identify existing records... and as chulett mentioned should be identified before going to target ... use look up ....

otherwise ... enable index and use reject link logic ...

u can test both and find wt gives better performance.

Look up with condition and drop worked

Posted: Mon Nov 01, 2010 11:32 am
by RaviReena
I tried with lookup and added a condition for key columns with "drop".It worked. thank you for all the support.