Importing a .csv file using NimbleCSV
An article by Jacob Swanner NimbleCSV: Parsing into Elixir Maps filled in some gaps in the official documentation.
Jacob’s article shows how to return the list of maps for further processing.
Now that I have a better understanding of how the parsing occurs, I’ll likely use the Stream.run
style
of the official documentation in my final code.
That should allow me to stream the data out of the file and into the Mnesia data store.
Example data file:
cve_id,cve
CVE-2011-0001,"{""cve"": {""data_type"": ... ""2023-02-13T03:22Z""}"