ItemReaders Flashcards
(10 cards)
What is a FlatFileItemReader?
An ItemReader that reads data from a flat file like CSV or TXT.
What is a JpaPagingItemReader?
An ItemReader that reads data from a JPA repository in pages.
How do you configure a JdbcCursorItemReader?
By setting a datasource, sql query, and RowMapper.
How do you read an XML file in Spring Batch?
Using StaxEventItemReader with an Unmarshaller.
How can you limit the number of records read at once?
By setting pageSize in a paging reader like JpaPagingItemReader.
What is MultiResourceItemReader?
A reader that reads from multipe files dynamically.
How do you configure a FlatFileItemReader with field mapping?
Using DelimitedLineTokenizer or FixedLengthTokenizer with BeanWrapperFieldSetMapper.
What is JsonItemReader?
A reader that reads JSON data from a file or stream.
How can you process a large database efficiently in Spring Batch?
By using JpaPagingItemReader or JdbcPagingItemReader?
What is SynchronizedItemStreamReader?
A wrapper that ensures thread safety for non-thread-safe readers.