After Job query in PX

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
vintipa
Participant
Posts: 136
Joined: Wed May 07, 2008 11:26 am
Location: Sydney, Australia
Contact:

After Job query in PX

Post by vintipa »

hi,

In a load job i read a file and then load it to oracle table using Oracle Enterprise stage. but in the same job i need to update one column of the table after the job finishes. this is same as after job query in server eddition. how can i acieve this in PX.
Vinay
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

Write a shell script to update the column of the table. Call this script through ExecSh after job utility.

HTH
Arvind
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

Hello Vintipa,

In oracle enterprise stage we have options call Open Command and Close Command in stage propertise tab.

in your case you can use Closed Command options and can write the use defined sql query to update the table based on required condition.
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
DEEPTI
Participant
Posts: 9
Joined: Wed Nov 21, 2007 12:19 am

Re: After Job query in PX

Post by DEEPTI »

Hi

Have a look at this post .... Might help u

viewtopic.php?t=90162&highlight=Sql+in+Oracle+stage

Thanks
Deepti
vintipa
Participant
Posts: 136
Joined: Wed May 07, 2008 11:26 am
Location: Sydney, Australia
Contact:

Post by vintipa »

Hi,

i am trying the close Command option now. i placed the foll query : update erec_pa9028 set ZZRLVLDT = '99991231' where ZZRLVLDT is null

but i get the following error : EREC_9028,2: Fatal Error: Invalid close command : update erec_pa9028 set ZZRLVLDT = '99991231' where ZZRLVLDT is null.

this runs fine in TOAD. may be there are some things to follow when writing a command in close command option!

please throw some light on this.
Vinay
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

Better to use DRS(Dynamic RDMS stage)

this stage contains before and after sql tab options as like as server oracle stage
Srinu Gadipudi
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

Better to use DRS(Dynamic RDMS stage)

this stage contains before and after sql tab options as like as server oracle stage
Srinu Gadipudi
singhald
Participant
Posts: 180
Joined: Tue Aug 23, 2005 2:50 am
Location: Bangalore
Contact:

Post by singhald »

Hi vintipa ,

provide the correct databse schema name before the table name. and see weather you are running the oracle load in same schema or not

regards,
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
vintipa
Participant
Posts: 136
Joined: Wed May 07, 2008 11:26 am
Location: Sydney, Australia
Contact:

Post by vintipa »

hi :)

the DRS idea works for me.... thanks.
Now i'll try and achieve the same thing using Oracle Ent stage itself.
kindly let me know if anymore mistakes exist in the close command i used.
Vinay
Post Reply