in Education by
I have huge JSON files in a folder approx 200 each of 300 mbs approx. I need to write Spring batch to read the files and process one by one. Basically means read one file at a time then run the processor then run the writer then read next file, The file is basically customer data and activity dump, with each file containing several users data and many files. Like below [{ "cutomerId":123, "customerName":"bla babha", "phoneNumber" : 5060974321, .. ,, },{ "cutomerId":123, "customerName":"bla babha", "phoneNumber" : 5060974321, .. .. } ] Since I cant read all the files at one due to space issue. Is this possible. what would be the configuration. Please help. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Spring Batch v4.1 introduced the JsonItemReader which you can use to read your json files. More details about Json support can be found in the JSON Item Readers And Writers section of the reference documentation. This reader can be used as a delegate to the MultiResourceItemReader (as Luca Basso Ricci mentioned in the comment) to read multiple json files in a directory. You can find an example here. The example shows a FlatFileItemReader as a delegate but you can use a similar configuration with a JsonItemReader instead. Hope this helps.

Related questions

0 votes
    I'm trying to query two JSON files that I put in a src/data directory. I installed gatsby- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    I'm trying to query two JSON files that I put in a src/data directory. I installed gatsby- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    I am trying to retrieve a particular file from multiple FTP servers. those server details are stored in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 18, 2022 in Education by JackTerrance
0 votes
    I been receiving date in the "yyyy-MM-dd'T'HH:mm:ss.SSSXXX" format from JSON input, which gets ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 27, 2022 in Education by JackTerrance
0 votes
    Locked. This question and its answers are locked because the question is off-topic but has historical ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    I am new to python and cloud vision.I need to label ~20k images.My code although does the work, ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    Which of the following is method of JDBC batch process? (a) setBatch() (b) deleteBatch() (c) removeBatch() (d ... Beans & JDBC of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of the following is method of JDBC batch process? (a) setBatch() (b) deleteBatch() (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    _______is the syntax to read JSON data?...
asked Mar 4, 2023 in Technology by JackTerrance
0 votes
    How to display JSON in an easy-to-read (for human readers) format?...
asked Jan 11, 2021 in Technology by JackTerrance
0 votes
    I want have a setup of redis where I write to master and read from slave, without any sentinel. I ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    How can we stash only one of multiple changed files on my branch?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    What kind of files can be imported or exported using the COPY command (1)sstables (2)CSV (3)json (4)parquet...
asked Apr 17, 2021 in Technology by JackTerrance
0 votes
    What is the use of @ComponentScan in the class files in Spring boot?...
asked Jul 7, 2021 in Technology by JackTerrance
0 votes
    I have been able to define multiple aspects (one is @Before and another is @Around) using Spring AOP ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 18, 2022 in Education by JackTerrance
...