enable or disable component

Highlighted
Eight Stars

enable or disable component

Hi,

 

Is it possible to disable or enable a component during runtime ?

 

I have a similar set of components to be used in two jobs wherein for one of the jobs i have an extra component at the last and rest remains the same.

I was rather thinking of making it in one job wherein according to constraint i can enable or disable the last component.

Please suggest.

 

Here,

Disable -> Deactivate

Enable -> Active

 

Thanks.


Accepted Solutions
Highlighted
Moderator

Re: enable or disable component

Hello,

Can you use trigger to control your work flow? Here is RunIf trigger which triggers a subjob or component in case the condition defined is met. For further information about Run if, please have a look at document about:https://help.talend.com/reader/fF_f1a23ZlLpfb9XfZUXWA/rpFV93Uc4LKksvXQFtSdWg?section=Raa59470.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

View solution in original post


All Replies
Highlighted
Moderator

Re: enable or disable component

Hello,

Can you use trigger to control your work flow? Here is RunIf trigger which triggers a subjob or component in case the condition defined is met. For further information about Run if, please have a look at document about:https://help.talend.com/reader/fF_f1a23ZlLpfb9XfZUXWA/rpFV93Uc4LKksvXQFtSdWg?section=Raa59470.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

View solution in original post

Highlighted
Employee

Re: enable or disable component

Activate or Deactivate components means the actual code generated is different.  Hence it cannot be done at runtime.  It is a design time only feature.  Use an Run if trigger. 

Highlighted
Eight Stars

Re: enable or disable component

Hi ,

I am not sure the RunIf will work.
here is my job wherein i want to create the output file where no of unique rows is greater than 0.
Application is not allowing to connect the RunIf component in the design, is there any other component to be added in between to make the job run ?

also note: the output files have different headers
Thanks

Highlighted
Employee

Re: enable or disable component

You can check the option "Don't generate empty file" on the tFileOutputDelimited, and it will not generate a file when no unique rows are there.

Highlighted
Eight Stars

Re: enable or disable component

I have checked that option , it doest write the rows but its still writing the header.
I have set condition where the second file has rows greater than zero but when the job is executed the output file has header from first file and the rows from second file

 

also one more point, for both the output files,  name and file location is same just the file content is different;

 

Now i have found a solution, it works but dont know how much feasible is this solution as i am new to talend

I am generating the header differently based on the consraints before writing the data in the file.

now while writing the data i unchecked the include header option and so i am getting the desired result.

 

If there is any other way please let me know.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog