Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

easy way to switch on and off tLogRow

Highlighted
Six Stars

easy way to switch on and off tLogRow

Hi, I'm looking for an easy way to switch on and off tLogRow : how to change tLogRow enable or disable easily .

I'm using talend open stdio for data integration.

  Best regards,

 

Highlighted
Moderator

Re: easy way to switch on and off tLogRow

@coffeeno ,Deactivate tLogrow or Activate if it is Deactivated.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Six Stars

Re: easy way to switch on and off tLogRow

sorry for little explanation. i know how to manually activate or deactivate components.

 

i would like to change many tLogRows activate or deactivate status.

 

Highlighted
Eleven Stars

Re: easy way to switch on and off tLogRow

 

You cannot deactivate/activate Component at runtime but You could redirect tLogRow Output to File instead of Console dynamically. Below Link will help ,

 

https://community.talend.com/t5/How-Tos-and-Best-Practices/Redirect-the-output-from-the-console-to-a...

 

You could set the steam based on context condition.

Regards
Abhishek KUMAR
Highlighted
Community Manager

Re: easy way to switch on and off tLogRow

If you are comfortable using a bit of Java you could write your own method for doing this. In the past the I have created context variables for the purpose of switching on debugging code in jobs running in Production. So if something was showing weird behaviour, I was able to set a context variable called "Debug" to true. Then, in different parts of the job I had certain mechanisms triggered by this context variable. Nothing would change the data that was produced, but it would reroute information or output more information to logs. 

 

Using this in your job you could add tJavaFlex components which are configured to output column information (using System.out calls) IF your "Debug" variable is switched to true. Otherwise, the data is just passed straight through your tJavaFlex. 

 

That is just one example. It might not suit your precise requirement, but hopefully it will give you some ideas.

Highlighted
Six Stars

Re: easy way to switch on and off tLogRow

Does "run if trigger" solve my issue ?

 

I tried but i couldn't put "if" before tLogRow.

Highlighted
Community Manager

Re: easy way to switch on and off tLogRow

No, the RunIf is just a trigger. It doesn't carry datarows. Your requirement is one which is not supported out of the box, but is entirely possible using the method I suggested.

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