Skip to content

Latest commit

 

History

History
 
 

data

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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