-
Hi there, I'm looking at using a I don't want to validate all the loaded csv file against a baseline file as that would be very inefficient. The analogy i'd present would be for |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 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 could be found at https://fastcsv.org/guides/examples/indexed-read/. Best, Oliver |
Beta Was this translation helpful? Give feedback.
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…