Is anyone aware of any tutorials that demonstrate how to import data in a Ruby app with FasterCSV and saving it to a SQLite or MySQL database?
Here are the specific steps involved:
- Reading a file line by line (the
.foreachmethod does this according to documentation) - Mapping header names in file to database column names
- Creating entries in database for CSV data (seems doable with
.newand.savewithin a.foreachblock)
This is a basic usage scenario but I haven't been able to find any tutorials for it, so any resources would be helpful.
Thanks!