From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

twaitforsql and java.sql.SQLException: Result set after last row

Highlighted
Seven Stars

twaitforsql and java.sql.SQLException: Result set after last row

Hi

I have a scenario where I need to run a set of jobs depending on a output of a sql, so i'm using twaitforsqldata. the SQL has to be executed only once, only if it returns a row, the flow should proceed otherwise it has to skip all jobs. when i use the below sql in twaitforsqldata, i'm getting the error  "java.sql.SQLException: Result set after last row", when i searched it seems like java produces this error when the sql returns no rows. Even when there is a option to check for Zero rows in twaitforsqldata, why am I getting this error? and is there any way to handle this in twaitforsqldata ( at this moment i don't want to use a java component)

 

SELECT '1' col FROM table1 WHERE (select somefunction('dfd') from dual) = 'YES'

thanks

mj

Highlighted
Thirteen Stars

Re: twaitforsql and java.sql.SQLException: Result set after last row

use count(*) in place of 1 then test value into a tmap then use tflow to iterate tu link to your job.

Francois Denis

Tag as "solved" for others! Kudos to thanks!

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