Job runs twice before ending

Six Stars

Job runs twice before ending

Hi,

 

I have a job the reads a tFileInputDelimited and CSV Lookup through the tMap and outputs two TFileOutputDelimited files.

 

The job reads and process all the input data, creates the two output files and then restarts again. After processing the data the second time, the job completes and the output data looks correct.

 

Can anyone tell me why the job is running twice and how I can get this to end after processing the data the first time?

 

All the best.


Accepted Solutions
Highlighted
Eight Stars

Re: Job runs twice before ending

I think the reason is you have two triggers that point to your main flow, the tSetGlobalVars and tLibraryLoad.  You should chain those two inline to fix it.  Right now it runs like this so you process your rows twice:

 

tSetGlobalVars -> Your main logic subjob  -> tLibraryLoad -> Your main logic subjob

 

If you need the tSetGlobalVars and tLibraryLoad to run before your main logic then just set it up like this:

tSetGlobalVars

on component ok >

tLibraryLoad

on component ok >

Your main logic subjob

--
Please give Kudos and mark topics as solved where appropriate.

All Replies
Community Manager

Re: Job runs twice before ending

What makes you think it is running twice? Can you show us a screenshot of the job?

Six Stars

Re: Job runs twice before ending

Hi,

When I watch the job run, I see the file row counts increase. After it finishes processing the input once, then the row counts reset to zero and its begins to run again. Once the job process the data twice, here is a look at the screen. Any idea why it cycles through the data twice?

 

 

 

TalendScreenPrint.png

 

Highlighted
Eight Stars

Re: Job runs twice before ending

I think the reason is you have two triggers that point to your main flow, the tSetGlobalVars and tLibraryLoad.  You should chain those two inline to fix it.  Right now it runs like this so you process your rows twice:

 

tSetGlobalVars -> Your main logic subjob  -> tLibraryLoad -> Your main logic subjob

 

If you need the tSetGlobalVars and tLibraryLoad to run before your main logic then just set it up like this:

tSetGlobalVars

on component ok >

tLibraryLoad

on component ok >

Your main logic subjob

--
Please give Kudos and mark topics as solved where appropriate.
Six Stars

Re: Job runs twice before ending

nfz11,

By linking the two together, the job only reads the input files in once, processes and finishes!

 

Thank You NFZ11

 

 

 

 

Community Manager

Re: Job runs twice before ending

Nice spot @nfz11!!

Four Stars

Re: Job runs twice before ending

Can someone please check and let me know if this is something related to my issue?

 

https://community.talend.com/t5/Design-and-Development/Kafka-is-storing-messages-twice/m-p/161997/hi...

Community Manager

Re: Job runs twice before ending

I doubt this is happening, but you can check by downloading a Kafka client to view the messages that are stored.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads