not printing anything on tLogRow if filtered data is empty

Five Stars

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.
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

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

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