I'm wondering, when I do a SQL query, how can I configure an different outcome based on the resulting row count?
In other words, return different status codes (using the tRESTresponse) based on the query outcome (rows returned vs. none).
NB_LINE may be not very effective if number of rows big - before return number of rows Talend will receive all data from server
I prefer use SQL construction tMSSQLRow, like
SELECT CASE WHEN EXISTS (SELECT id FROM t1) THEN 1 ELSE 0 END AS check_result
SELECT CASE WHEN EXISTS (SELECT id FROM t1) THEN (SELECT count(*) as cnt FROM t1) ELSE 0 END AS cnt
return number of rows
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Take a look at this technical overview video of Talend API Designer
Find out how to get started with APIs