Spring Batch Job for truncate table
<p>I have a two step in my Job
Step 1-->Truncate data from table A
Step 2--> Read from different datasource and insert data into table A</p>

<p>In Step 1 initialization of writer bean is throwing the exception, below is the code of writer bean and exception.</p>

<pre><code>        @Bean
    public ItemWriter truncateData() {
        JdbcBatchItemWriter writer = new JdbcBatchItemWriter();
        writer.setSql("TRUNCATE TABLE A"); 
        writer.setDataSource(dwhDataSource);
        return writer;
    }
</code></pre>

<p>Exception:-</p>

<pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'truncateData' defined in class path resource Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Using SQL statement with '?' placeholders requires an ItemPreparedStatementSetter
</code></pre>

<p>Please let me know if you need more information and i'm doing any wrong in creating the bean.</p>