Solved

Init query in the JDBC Query Consumer not working for Delete previous data

  • 18 October 2023
  • 2 replies
  • 25 views

  I use Streamsets Data Collector to Load data from Stage 2 database tables (JDBC Query Consumer) using a query and Write loaded data to another Stage 2 Database table (JDBC Producer). I use Init Query as below to delete the previous records before loading data. But this does not delete any record from the table. It would be great if someone can help me.

 

icon

Best answer by Bikram 18 October 2023, 19:07

View original

2 replies

Userlevel 5
Badge +1

@nuwancml 

you can use start event with jdbc query option and there you can delete the data from the table before loading data into it.

 

Thanks for answering. I was using Init Query in the JDBC Query Consumer to delete previous records; it did not work. I removed the init query from the JDBC Query Consumer and added a Start Event. The pipeline works as I expected. The solution you gave works perfectly.

Reply