ItemReaders Flashcards

(10 cards)

1
Q

What is a FlatFileItemReader?

A

An ItemReader that reads data from a flat file like CSV or TXT.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a JpaPagingItemReader?

A

An ItemReader that reads data from a JPA repository in pages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you configure a JdbcCursorItemReader?

A

By setting a datasource, sql query, and RowMapper.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you read an XML file in Spring Batch?

A

Using StaxEventItemReader with an Unmarshaller.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you limit the number of records read at once?

A

By setting pageSize in a paging reader like JpaPagingItemReader.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is MultiResourceItemReader?

A

A reader that reads from multipe files dynamically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you configure a FlatFileItemReader with field mapping?

A

Using DelimitedLineTokenizer or FixedLengthTokenizer with BeanWrapperFieldSetMapper.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is JsonItemReader?

A

A reader that reads JSON data from a file or stream.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How can you process a large database efficiently in Spring Batch?

A

By using JpaPagingItemReader or JdbcPagingItemReader?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is SynchronizedItemStreamReader?

A

A wrapper that ensures thread safety for non-thread-safe readers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly