ga-wdi-boston / capstone-project

Other
3 stars 29 forks source link

Trying to Bulk Load Data (CSV) to Heroku #881

Closed kailinc closed 6 years ago

kailinc commented 6 years ago

My project is done and ready to go, but I need to bulk load items data into the Heroku API. It seems like I have to use mLab to do this.

Documentation from mLab

mongoimport -h ds159033.mlab.com:59033 -d heroku_j0xn3n47 -c <collection> -u <user> -p <password> --file <input .csv file> --type csv --headerline

My user is 'heroku_j0xn3n47'.

I tried the following command and I am getting an error.

Command I tried

$ mongoimport -h ds159033.mlab.com:59033 -d heroku_j0xn3n47 -c items -u heroku_j0xn3n47 -p xxxxxxxxx  --file data/languages.csv --type csv --headerline

Error Received

2017-09-04T15:02:42.887-0400    Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed.
2017-09-04T15:02:42.887-0400    imported 0 documents
jordanallain commented 6 years ago

you have to create a db user on mlab's website and then sign in with that username and password

kailinc commented 6 years ago

That might have been it. I just made a create action and made items one by one. =_=