title: Spring Batch delete rows from database
body: <p>I am writing a job to delete a large of rows from database</p>
  
  <pre><code>&lt;job id="clean-data-except-90009" xmlns="http://www.springframework.org/schema/batch"&gt;
  
      &lt;step id="clean-data"&gt;
          &lt;tasklet&gt;
              &lt;chunk reader="abc" writer="cleanDataVendPoWriter" 
              commit-interval="100" skip-limit="100" retry-limit="50"&gt;
                  &lt;skippable-exception-classes&gt;
                      &lt;include class="org.springframework.dao.DuplicateKeyException" /&gt;
                  &lt;/skippable-exception-classes&gt;
                  &lt;retryable-exception-classes&gt;
                      &lt;include
                          class="org.springframework.dao.DeadlockLoserDataAccessException" /&gt;
                  &lt;/retryable-exception-classes&gt;
              &lt;/chunk&gt;
              &lt;no-rollback-exception-classes&gt;
                  &lt;include class="org.springframework.dao.DuplicateKeyException" /&gt;
              &lt;/no-rollback-exception-classes&gt;
          &lt;/tasklet&gt;
          &lt;!-- &lt;next on="COMPLETED" to="get-order-delete"/&gt;  --&gt;
      &lt;/step&gt;
  </code></pre>
  
  <p>And here is writer:</p>
  
  <pre><code>&lt;bean id="cleanDataVendPoWriter"
      class="org.springframework.batch.item.database.JdbcBatchItemWriter"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="sql" value="${coms.dsv.sql.deleteVenPo}" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>I don't know to put anything into "reader", I just want to delete rows in a table of database and not reading data from anywhere.
  If I remove reader in chunk, it will error. </p>
  
  <p>How can I solve this problem?</p>