Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
vidya821
Creator
Creator

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.

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable

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

View solution in original post

5 Replies
Anonymous
Not applicable

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

Anonymous
Not applicable

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. 

vidya821
Creator
Creator
Author

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


activate_deactivate_component.png
Anonymous
Not applicable

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.

vidya821
Creator
Creator
Author

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.


separate_header_output.png