I need to:
- Upload a csv or pipe-delimited file
- Parse the file for specific attributes and save it in a database
- Generate a query to a third party based on the parsed information
- Receive a response from third party
- Save the response info into DB
- View the response Data.
For the first 3 steps, I’m trying to figure out the best way to parse and generate the query. Should I save the file to the DB and then parse it?
Should I parse in the controller before the file is saved in the db?
Should I use the information saved in temporary values to create a third-party query?
Is there a gem that can handle all of this?
Any advice would be greatly appreciated.