Six Stars

Possible to see order of component execution in DI

Is there a easy way to view the order components will execute in a particular job? I'm interested in understanding how execution order travels or behaves when components are not connected and whether its possible to bypass executing some components without needing to add additional logic

  • Data Integration
7 REPLIES
Nine Stars

Re: Possible to see order of component execution in DI

OnSubJobOK, OnComponentOK and Trigger links can control execution order. tPrejob and tPostjob can specify parts of jobs that need to run at the start or end of a job. Beyond that, components execute in parallel.
Six Stars

Re: Possible to see order of component execution in DI

I'm having trouble understanding why the following is happening when using OnComponentOk

I want the components in Green to execute so long as there isn't an error in the input when compared against the schema. If there is an error I want the flow to switch to the yellow path and within that flow if there is an errorMessage and the errorMessage contains a certain value then switch over to the components in the Red box

 

What is happening

  1. The flow will continue until all the rows in the excel file are read, in this case 24 rows (tFileExcelInput set to stop reading when encountering empty rows)
  2. BUT then the yellow route will execute even though there has been no schema error rows produced (0 rows in 25.84s) by the Reject flow from CompareToCurrentRegisterSchema
  3. The tFilterRow conditions are not met as no input data was provided to test but the "Filter" flow still outputs 0 rows to an Excel file before going to tFlowToIterate which triggers onComponentOk 

My Questions are

  1. Why does execution "jump" to the yellow arrow when I expect execution to stop (as the file contents have all been read and no new rows are flowing through the green components)
  2. How do I get the execution to stop without disabling the Schema Reject flow

TalendFlow.png

 

Nine Stars

Re: Possible to see order of component execution in DI

Components execute, even without data to process. If you need to control execution, you'll need to use conditional links.

From the looks of your job, you have multiple possible schemas to choose from. Does each file have a single schema? If so, a better design might be to interrogate the file for its schema, then set up three conditional triggers that start a different subjob based on the schema found.
Six Stars

Re: Possible to see order of component execution in DI

Hi @cterenzi would you be able to give an example of how to interrogate the file for its schema and conditionally trigger based on that? My way is not as elegant as I would like

Nine Stars

Re: Possible to see order of component execution in DI

While there may be a way to generalize it, I would have to design to the data I'm expecting to receive.

Six Stars

Re: Possible to see order of component execution in DI

Any guidance would be most appreciated.
Nine Stars

Re: Possible to see order of component execution in DI

Read in a row with header data, analyze it with one of the tJava components to set a variable, then key off that variable when creating your conditional link.