Questions tagged [spring-batch-tasklet]

135 questions
0
votes
1 answer

How to process files into chunks and write in multiple files using Spring batch?

I have around 50 CSV file having data of around 60 million to process. But I don't want all these file to be merged into single CSV. Instead want to merge in small chunk of files Example - I want to process first three file and merge into single…
0
votes
1 answer

How to disable/avoid linesToSkp(1) from next file onwards in spring batch while processing large csv file

We have large csv file with 100 millions records, and used spring batch to load, read and write to database by splitting file with 1 million records using "SystemCommandTasklet". Below is snippet, @Bean @StepScope public SystemCommandTasklet…
0
votes
1 answer

JOOQ and Spring Batch transaction management

I am currently working on Spring Batch (2.6.3) application and I am using JOOQ (3.14.15) to access MariaDB database (10.5.8). So far I got working few jobs and got to the point where I am testing transactions. I am trying to run tasklet which is to…
0
votes
0 answers

Spring Batch Single Reader Multiple Processers and Multiple Writers

Here is my requirement. In spring batch I need to read from single source(file reader or from DB), process records comes from reader as multiple processers and write each processed items in separate writers. I have tried with…
0
votes
1 answer

Spring batch AsyncItemWriter flag to next step

I have two steps job. Step1 ends up writing to file using AsyncItemWriter, while I am writing to a file I want to check every record if it has any error in it (imagine record object with error flag in it). In step 2, if any of the previously written…
Sagar
  • 5,315
  • 6
  • 37
  • 66
0
votes
1 answer

How correctly run task in RepeatStatus.CONTINUABLE while some condition?

I have a simple job that consists of 2 tasklet each of them making an HTTP request to get some status result. @Bean public Job receiveStatusesJob( @Qualifier(RECEIVE_STATUSES_PARTITIONER_BEAN) Partitioner partitioner, …
0
votes
1 answer

Spring Batch - Need help and suggestion to decide on the best approach to compare two different Databases and create an excel report with differences

Problem statement : I need to compare the details between two different databases and report the mismatches through an excel. One of these data source is a primary Datasource(DB2) which I trust and the secondary data source(in this case HANA) needs…
0
votes
1 answer

Set job name in Spring Batch Test

I am working on Spring Batch Unit test and every time I run my test-case I am getting job name as "TestJob". Is it possible to set/alter this and provide a new job name? I tried and worked around: jobLauncherTestUtils.setJob() but could find…
0
votes
1 answer

X-Ray configuration for Spring Batch Job

X-Ray is integrated into my service and everything works fine when some endpoints are triggered from other services. The Spring Batch job is used to process some data and push some part of it to SNS topic. This job is launched via…
0
votes
1 answer

Any support in Spring Batch for reading multiple files under zip

I am looking for loading people records from multiple files based on location. Is there any easy support by Spring batch to load multiple files named location weise? Easy Country_people.zip -> Location1 (folder1) containing 3 text…
0
votes
1 answer

In Spring Batch, linked with a ItemReader call I want to call a static util method to populate a string

I have a Spring Batch reader with following configurations. This reader is reading from the database and and at a time its reading a page size records. @Autowired private SomeCreditRepot someCreditRepo; public…
0
votes
1 answer

How to run SystemCommandTasklet asynchronously

I want to run a shell script using Spring Batch and let the batch control job id and status. But I don't want my app to wait/hang until this shell script (SystemCommandTasklet) to be completed. @Override @Bean(name = "myJobLauncher") …
likeachamp
  • 765
  • 4
  • 11
  • 21
0
votes
1 answer

How to read and perform batch processing using spring batch annotation config

I have 2 different file with different data. The file contains 10K record per day. Ex: Productname price date T shirt,500,051221 Pant,1000,051221 Productname price date T shirt,800,061221 Pant,1800,061221 I want to create final output file by…
0
votes
1 answer

Read New File While Doing Processing For A Field In Spring Batch

I have a fixedlength input file reading by using SPRING BATCH. I have already implemented Job, Step, Processor, etc. Here are the sample code. @Configuration public class BatchConfig { private JobBuilderFactory jobBuilderFactory; …
0
votes
1 answer

Spring batch run exception throwable method after each tasklet done in afterstep()

public class TaskletConfiguration { ... @Bean public Step step() { return steps.get("step") .tasklet(tasklet) .exceptionHandler(logExceptionHandler()) // Handler for logging exception to specific channel …
osflw
  • 79
  • 1
  • 8
1 2 3
8 9