Questions tagged [spring-batch-tasklet]

135 questions
0
votes
1 answer

Do not run the job if it is already running

I am making a simple Sprint batch application that reads from a CSV file and writes it into the database. I want to throw an exception when we try to trigger a job that is already running. So before starting the job, I am checking if there is…
0
votes
0 answers

Spring Batch ETL Jobs Parallel Execution is Causing independent Readers to Wait

I have developed an ETL application utilizing Spring Batch, wherein data is fetched through REST requests. The application comprises around 15 Spring Batch classes, each responsible for loading a different dataset. One of the class/job FitsVendorJob…
0
votes
1 answer

How to have next Steps read data on tables updated by previous Steps in Spring Batch?

I have a job that has 2 steps, with their own ItemReader and ItemWriter. The 1st Step reads and updates a table. The 2nd Step should read from the same updated table then transfers entries to another database. However, when testing, the 2nd Step…
Vincere
  • 1
  • 1
0
votes
1 answer

Issue with BatchMetaDataConfiguration when upgrading Spring Batch version 4.x to 5.x

`I have the below class to configure my Meta Data information of the jobs that are running. As part of Spring Batch 5 I understand "MapJobRepositoryFactoryBean" is no longer available. What is the alternative for this and how do I implement the…
0
votes
0 answers

Spring Batch Can we have in memory for batch job and application have other data source

Spring batch can we have in memory for batch job and for application level we have other data source like db postgres. Could you please help me on this? extends class DefaultBatchConfigurer and override the public void setDataSource(DataSource…
0
votes
1 answer

Spring Batch 5 with Cassandra DB

Sorry I'm totally new to "Spring Batch". My requirement is , I need to create Spring Batch 5 project which reads rows from cassandra db (Lest say records of particular status in a table), process it (Resend kafka notification, update status and…
0
votes
1 answer

Spring Batch - How to make multi threaded Reader, Processor and Writer?

What is the requirement? I'm using the Spring batch application for Bulk File Processing. Steps: Reading the file using network calls. Preparting a bulk JSON Payload and calling endpoint. Writing responses to files. What is going wrong? Everything…
0
votes
0 answers

Validating two database table contents using spring batch

We have two tables (same in both) in Db2 and postgreSQL. let's say table name is "user" has id, name, mailId as columns. We need to compare/validate these two tables. But for that we need two item readers for a single step in spring boot. In that…
0
votes
1 answer

Spring Batch Tasklet unit tests

I'm implementing a Spring Batch application. There are a couple of Tasklets with StepExecutionListener. I want to know how to unit test them. For example below sample Tasklet: public class MyTasklet implements Tasklet, StepExecutionListener { …
Eric
  • 1,031
  • 4
  • 14
  • 29
0
votes
1 answer

How to pass partitioned Spring Batch data to a tasklet in a sequential manner?

Usecase: I have a list of objects holding customer information. I have to make an API call using the customerId from the individual objects in the list. Approch: Spring Batch Tasklet Implementation Approch: Spring Batch Tasklet Implementation Note:…
Jazz
  • 11
  • 3
0
votes
1 answer

Spring batch Performance issue

Spring batch with CSV File Read And Write. Hello folks, I am trying to write a spring batch code which will read CSV and write a csv after some operation. While same thing with simple java program is taking 1 minute performing 20 million data. with…
0
votes
0 answers

Spring Batch Connection Pool issue Already in use

enter image description herewhen I am running the spring batch for saving the 15 csv file data into oracle database. it is saving 10 csv apart from that remaining csv file data are not saved it is throwing exception:- Could not open JDBC Connection…
0
votes
0 answers

Spring Batch: How to pass respective data from 1 step to another when partitioning is also in place?

I have a situation where I have 2 steps which run in series. Now I also have partitioning in place on top of it. So each partition runs 2 steps in sequence. Now I have 2 basic questions: How can I achieve such setup? I have added partitioner to 1st…
0
votes
0 answers

Override commit-interval property in runtime from a bbdd query in Spring Batch

I have a job with a list of steps. I want that this steps use a commit-interval from a property in the database (using NamedParameterJdbcTemplate and using the stepName as condition in the where of the SQL sentence) so I can change it at runtime…
JuniorGuy
  • 107
  • 1
  • 12
0
votes
1 answer

How to Read only selected Data that satisfies a condition from csv using Spring Batch

I have a csv with [id,info] and I have access to a service which returns me a list of ids(say ActiveIds). I would like to read from the csv only those ids that are present in ActiveIds and would like to access info from the first csv for the info of…
1 2 3
8 9