streamsets

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


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.

enter image description here


Solution

  • 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. It deletes previous records, and the pipeline works as I expected.
    My question in the community: https://community.streamsets.com/show-us-your-pipelines-71/init-query-in-the-jdbc-query-consumer-not-working-for-delete-previous-data-2028?postid=4733#post4733

    enter image description here