One Star

not printing anything on tLogRow if filtered data is empty

Hi,
I need to log information on an upsert only if the number of records upserted is greater than 0. If nothing gets upserted, i don't want this empty table generated by tLogRow to be printed:
.-------------+------+------+--------+-------------+--------------------.
| DATA UPSERTED |
|=------------+------+------+--------+-------------+-------------------=|
|-------------------------------------header------------------------------|
|=------------+------+------+--------+-------------+-------------------=|
'-------------+------+------+--------+-------------+--------------------'
I've tried with this scenario:
tMap -- tFilterRow -- tLogRow
in tMap I have defined Numeric.sequence("count_row_upserted",1,1) to count the number of rows taken from tMap and in my tFilter I've put this condition:
input_row.count_rows_uperseted > 0
but I still get the empty table printed. Any idea on how I could do this?
Thanks.
1 REPLY
Community Manager

Re: not printing anything on tLogRow if filtered data is empty

Hi
tLogRow is used to print the result on the console, it is just a debug component, we usually remove it from the job when the job is executed in production environment. You can select basic mode on tLogRow, it will display nothing if there is no rows.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business