 <p>in the event that you want to 're-use' an existing <code>JdbcCursorItemReader</code> (or one of the other Spring Batch Jdbc*ItemReaders), you can switch the SQL dynamically by leveraging the step scope. Below is an example of a configuration that switches the SQL based on the <code>sqlKey</code> property from the <code>JobParameters</code>. the source of the statements is a simple map.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:batch="http://www.springframework.org/schema/batch" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd"&gt; &lt;batch:job id="switchSQL"&gt; &lt;batch:step id="switchSQL.step1"&gt; &lt;batch:tasklet&gt; &lt;batch:chunk reader="sqlItemReader" writer="outItemWriter" commit-interval="10"/&gt; &lt;/batch:tasklet&gt; &lt;/batch:step&gt; &lt;/batch:job&gt; &lt;bean id="sqlItemReader" class="org.springframework.batch.item.database.JdbcCursorItemReader" scope="step"&gt; &lt;property name="dataSource" ref="dataSource"/&gt; &lt;property name="sql" value="#{@sqlStatements[jobParameters['sqlKey']]}"/&gt; &lt;property name="rowMapper"&gt; &lt;bean class="de.incompleteco.spring.batch.data.ColumnRowMapper"/&gt; &lt;/property&gt; &lt;/bean&gt; &lt;util:map id="sqlStatements"&gt; &lt;entry key="sql1" value="select * from table_one"/&gt; &lt;entry key="sql2" value="select * from table_two"/&gt; &lt;/util:map&gt; &lt;bean id="outItemWriter" class="org.springframework.batch.item.adapter.ItemWriterAdapter"&gt; &lt;property name="targetObject" ref="outWriter"/&gt; &lt;property name="targetMethod" value="write"/&gt; &lt;/bean&gt; &lt;bean id="outWriter" class="de.incompleteco.spring.batch.item.SystemOutItemWriter"/&gt; &lt;/beans&gt; </code></pre> <p>here are the supporting classes;</p> <p>(a simple itemwriter)</p> <pre><code>package de.incompleteco.spring.batch.item; public class SystemOutItemWriter { public void write(Object object) { System.out.println(object); } } </code></pre> <p>(and a simple rowmapper)</p> <pre><code>package de.incompleteco.spring.batch.data; import java.sql.ResultSet; import java.sql.SQLException; import org.springframework.jdbc.core.RowMapper; public class ColumnRowMapper implements RowMapper&lt;String&gt; { public String mapRow(ResultSet rs, int rowNum) throws SQLException { return rs.getString(1); } } </code></pre> <p>and here's the remaining config</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"&gt; &lt;bean id="jobRepository" class="org.springframework.batch.core.repository.support.MapJobRepositoryFactoryBean"/&gt; &lt;bean id="jobExplorer" class="org.springframework.batch.core.explore.support.MapJobExplorerFactoryBean"&gt; &lt;property name="repositoryFactory" ref="&amp;amp;jobRepository"/&gt; &lt;/bean&gt; &lt;bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher"&gt; &lt;property name="jobRepository" ref="jobRepository"/&gt; &lt;/bean&gt; &lt;bean id="transactionManager" class="org.springframework.batch.support.transaction.ResourcelessTransactionManager"&gt; &lt;/bean&gt; &lt;bean class="org.springframework.batch.core.scope.StepScope"/&gt; &lt;/beans&gt; </code></pre> <p>and</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd"&gt; &lt;jdbc:embedded-database id="dataSource" type="H2"&gt; &lt;jdbc:script location="classpath:/META-INF/sql/schema-h2.sql"/&gt; &lt;jdbc:script location="classpath:/META-INF/sql/insert-h2.sql"/&gt; &lt;/jdbc:embedded-database&gt; &lt;bean id="dataSourceTransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt; &lt;property name="dataSource" ref="dataSource"/&gt; &lt;/bean&gt; &lt;/beans&gt; </code></pre> <p>and the sql stuff</p> <pre><code>create table table_one ( column_a varchar(50) ); create table table_two ( column_a varchar(50) ); --table one insert into table_one (column_a) values ('hello'); insert into table_one (column_a) values ('world'); --table two insert into table_two (column_a) values ('hey'); </code></pre> <p>now finally a unit test</p> <pre><code>package de.incompleteco.spring; import static org.junit.Assert.assertFalse; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersBuilder; import org.springframework.batch.core.explore.JobExplorer; import org.springframework.batch.core.launch.JobLauncher; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration({"classpath:/META-INF/spring/*-context.xml"}) public class SwitchSQLIntegrationTest { @Autowired private Job job; @Autowired private JobLauncher jobLauncher; @Autowired private JobExplorer jobExplorer; @Test public void test() throws Exception { //setup the parameters JobParameters parameters = new JobParametersBuilder().addLong("runtime",System.currentTimeMillis()) .addString("sqlKey", "sql1").toJobParameters(); //run JobExecution execution = jobLauncher.run(job,parameters); //test while (jobExplorer.getJobExecution(execution.getId()).isRunning()) { Thread.sleep(100); }//end while //load execution = jobExplorer.getJobExecution(execution.getId()); //test assertFalse(execution.getStatus().isUnsuccessful()); //run it again parameters = new JobParametersBuilder().addLong("runtime",System.currentTimeMillis()) .addString("sqlKey", "sql2").toJobParameters(); //run execution = jobLauncher.run(job,parameters); //test while (jobExplorer.getJobExecution(execution.getId()).isRunning()) { Thread.sleep(100); }//end while //load execution = jobExplorer.getJobExecution(execution.getId()); //test assertFalse(execution.getStatus().isUnsuccessful()); } } </code></pre>