cancel
Showing results for 
Search instead for 
Did you mean: 

How to run update query statement to update a table cell

Former Member
0 Kudos

I have a job within that has dataflow which loads data to target after teh dataflow is done loading, i would like to call to run the following: in the workflow context do i need to add a script object , plus also the below query is it the proper way to run an update statement.

sql('Target_DS','update tbl_job_status set endtime=sysdate() where endtime is null');

Thank you very much for the helpful info

kind regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Arun,

Is this the right way instead of doing enable recovery.

Manaully taking care of recoverable workflow logic, by updating a table_job_status(starttime and end_time columns)?

the only advantage of going this way rather than using recover as a unit is, if i use recover as a unit.

then if any problem occurs in any dataflow, then all the dataflow one more time gets executed.

instead i want only the data flow with the error occur has to run. for delta's.

Kind regards.

Edited by: cplusplus1 on Feb 13, 2012 4:21 PM

Former Member
0 Kudos

What i explained to you is a more modular structure, which can be easily controlled. Separate data flows will help you to monitor the process better.

Also you can have a separate job as well and write a script to sequentially execute the function.

Arun

Answers (1)

Answers (1)

Former Member
0 Kudos

You can use sql query but the process would be very slow.

I understand that you have to convert null values to sysdate(), better use nvl() function.

nvl(NULL,sysdate())

Arun

Former Member
0 Kudos

Arun,

Please if you don't mind can you tell me how to write the update . do i handle within the dataflow context or outside data flowcontext in workflow context usign script object?

i would like to update that table only after the dataflow finished successfully.

thank you

Former Member
0 Kudos

Create a new data flow in the same job.

Call the output table as source and connect to the query transform

In the query transform of mapping output schema column ( i guess end time ) write nvl(NULL,sysdate()).

This should work.

Arun