Skip to content

Querying Contents Of The Loaded Csv File #137

Closed Answered by osiegmar
bhreinb asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @bhreinb,

a custom CallbackHandler could be used to efficiently load only data that is relevant for your process. The Custom callback handler example shows how to implement such a handler. Basically you only have to implement a class that extends CsvCallbackHandler and inject this custom callback handler to one of CsvReader.builder().build() methods. It's questionable if the effort is worth the performance gain, as the data needs to be parsed anyway, but that might be different in your situation.

FastCSV itself does currently not have any built-in mechanism to query/parse only specific fields. To query only specific records, the IndexedCsvReader could be used. An example for this coul…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by osiegmar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants