Truncate(Delete All Records) table and insert records

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
Madhusv
Participant
Posts: 35
Joined: Sat May 07, 2005 1:38 am
Contact:

Truncate(Delete All Records) table and insert records

Post by Madhusv »

Hi ..I need to truncate the records from a table and then insert records coming from a source table. To do this am using 2 separate oracle stages - one for "delete all rows" and another one for upsert(insert and dummy update). But the problem is the records are getting deleted and inserted parallely and ultimately only a few rows are getting inserted into the target table.

Have provided a constraint @inrownum=1(For Delete oracle Stage) in a transformer prior to the 2 oracle stages. Linkorder - first delete all records link and then insert link.

Can someone advise me on how to achieve truncate and insert .

Regards..Madhu
hexa
Participant
Posts: 51
Joined: Sun Aug 08, 2004 6:25 am

Post by hexa »

Use Dynamic RDBMS Database

hexa
cmmurari
Participant
Posts: 34
Joined: Sun Jan 02, 2005 9:55 am
Location: Singapore

Post by cmmurari »

If you use Oracle enterprise Stage. you can choose in Target folder properties>> write method =Load and write mode=Truncate
Madhusv
Participant
Posts: 35
Joined: Sat May 07, 2005 1:38 am
Contact:

Post by Madhusv »

THANKS FOR THE REPLIES:-

But the problem is we want the reject link for the insertion.


Oracle Enterprise (Load/Truncate) and Dynamic RDBMS Will not provide the reject link.

How do I achieve truncate - insert and still have the reject link for the insert operation.
track_star
Participant
Posts: 60
Joined: Sat Jan 24, 2004 12:52 pm
Location: Mount Carmel, IL

Post by track_star »

You mean you want to be able to reject any records that fail the INSERT?
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Any adversity to simply executing a unix command call to sqlplus running a script with the statement "TRUNCATE TABLE drop storage;"?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply