Created
December 9, 2022 11:48
-
-
Save epaule/97abe1ce0185d6bf18731d92f79863ae to your computer and use it in GitHub Desktop.
comments on CSV parsing using Elixir & Nimnble & Flow from https://www.poeticoding.com/processing-large-csv-files-with-elixir-streams/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NimbleCSV.define(MyParser, separator: ";", escape: "\"") | |
def load_stream file do | |
file | |
|> File.stream!() | |
|> Flow.from_enumerable() | |
|> Flow.map(&MyParser.parse_string/1) | |
|> Enum.count() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment