Skip to content

Files

Latest commit

Oct 9, 2019
c09e03b · Oct 9, 2019

History

History
This branch is 1 commit ahead of RH-ANZ-Workshops/rating-api:master.

data

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jun 14, 2019
Oct 9, 2019
Oct 9, 2019
Jun 15, 2019

How to load data into the database

Get the pods

oc get pods

Copy the data folder into the mongoDB pod

oc rsync ./data mongodb-1-c8msv:/opt/app-root/src

Connect to the remote shell on the pod

oc rsh mongodb-1-c8msv

Run the mongoimport command to import the JSON data files into the database

mongoimport --host 127.0.0.1 --username userN0E --password MulQxIv2Rvy1QVtN --db sampledb --collection items --type json --file data/items.json --jsonArray
mongoimport --host 127.0.0.1 --username userN0E --password MulQxIv2Rvy1QVtN --db sampledb --collection sites --type json --file data/sites.json --jsonArray
mongoimport --host 127.0.0.1 --username userN0E --password MulQxIv2Rvy1QVtN --db sampledb --collection ratings --type json --file data/ratings.json --jsonArray