Page 1 of 1

Order of execution

Posted: Tue Mar 19, 2019 6:36 pm
by Gius
Hello,
I have a parallel job and inside this parallel job I have 2 flows ( 2 sources and 2 target ).
Is it possible to do something like ;
# First run the first sources db2 and when it finish, run the 2d sources db2.
# If not then run the first flow, when it finish, run the 2d flow.

Right now I have 2 flows inside the parallel job, 2 sources with 2 target but I can merge the flows and like obtain 2 db2 sources and 1 target, in this case, is it possible to put an execution order to the db2 sources ?


# I don't want to create a second parallel job, ,I would like to do this inside 1 parallel job.
# All sources have the same output fields

Thank You -

Posted: Tue Mar 19, 2019 10:58 pm
by ray.wurlod
You can't do it within a single parallel job as you've designed it.

You may be able to finagle something in the database, such as a stored procedure that executes one query then the next, but you can't do it in a single parallel job.

You can, of course, do it in a pair of parallel jobs run under the control of a sequence job or a job control routine/script.

Posted: Wed Mar 20, 2019 1:30 am
by chulett
Yeah, not in this tool. :wink:

Okay... sort of.. to clarify with a bit of revisionist history: That capability is not built into the tool as it is with at least one other that I'm now familiar with but can be accomplished with a bit of... shenanigans. As noted. :D

Aha!

Posted: Wed Mar 20, 2019 3:57 pm
by ray.wurlod
Of course you can. Sort of. Add a constant to each query, maybe 'A' and 'B', then use a Sort Funnel to make sure that all the 'A' records go through before any of the 'B' records.

Re: Aha!

Posted: Wed Mar 20, 2019 3:58 pm
by ray.wurlod
ray.wurlod wrote:Of course you can. Sort of. Add a constant to each query, maybe 'A' and 'B', then use a Sort Funnel to make sure that all the 'A' records go through before any of the 'B' records.
If you don't want to alter the queries, use a Column Generator stage.