Skip to main content
Solved

Pass parameter as filter condition in JDBC reader sql

  • August 8, 2023
  • 1 reply
  • 173 views

Forum|alt.badge.img+1

As per requirement I want to read a marker value from a file and pass that value as parameter in select SQL of a JDBC reader to pull only delta records. Is this possible in 13.9.1 version? Please advise with documentation link if available.

Best answer by AKislyakov

Hi @rupakde,

The best way to implement such logic is to use SQL Select step instead of JDBC Reader step. SQL Select allows parameterization of the query and executes it ones by each incoming row. So, your plan should look like following: Text File Reader step to read the marker value and then SQL Select to read incremental data from a database. You can find an example of it in the Tutorials project, the “06.11 SQL Select” plan.

 

1 reply

Forum|alt.badge.img+2
  • Ataccamer
  • Answer
  • August 9, 2023

Hi @rupakde,

The best way to implement such logic is to use SQL Select step instead of JDBC Reader step. SQL Select allows parameterization of the query and executes it ones by each incoming row. So, your plan should look like following: Text File Reader step to read the marker value and then SQL Select to read incremental data from a database. You can find an example of it in the Tutorials project, the “06.11 SQL Select” plan.