Datafable/epu-index

Import journals in database

Closed this issue · 6 comments

Import journals in database

I have a csvfile with news journals. These should be imported in the application.

Column 1: name
Column 2: spider_name

Delimiter: ";"

I needed a data migration script for developement. Maybe this can help: https://github.com/Datafable/epu-index/blob/master/tmp/migrate_data.py

Command implemented. Two addiditonal questions:

  • Should I run it on Heroku now with the journals.csv file from old_data (Google Docs folder)?
  • For now, the command expects the CSV dialect to be the one from old_data/journals.csv (no header line, ; separator, ...). If we ever need more flexibility, tell me and I'll implement something more sophisticated.

Thanks!

  • Yes, should be run on Heroku.
  • No, no more flexibility is needed for this.

Data loaded on Heroku. Please note there was already an entry for "Het Laatste Nieuws", I didn't dared to delete it since there were linked articles!

Ok. Actually that's all dummy data. So next time, the table can be trunced before uploading new data. I did not consider that database as production so far.