ErikPolzin / mongo-dongo

Repo for BigData Assignment1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MongoDongo - Assignment 1

Scripts to create, import to, inspect and test a Mongo DB.

By Erik, Richard, Bianca, Ryan and Stuart (aka Data?IBarelyKnowHer 😄)


File Structure

  • mongoshlongo.py: Code to convert dataset into a MongoDB dataset
  • mongotest.py: Runs automated test cases
  • data/validators.json: Some database strucutre rules
  • data/healthcare_dataset.csv: original dataset
  • CSC4013Z_Assignment1.pdf: Report

Installation

Follow the instructions to the install MongoDB shell. Then install pymongo with pip.

Usage

Use the mongoshlongo script, for example:

python3 mongoshlongo.py convert data/healthcare_dataset.csv data.json

Converts the CSV data into structured JSON data for inserting into the db.

python3 mongoshlongo.py import healthcare_db data.json

Imports JSON data into the test_database DB.


Imports JSON data into the healthcare_db DB.

Running test cases

Use mongotest.py to run the automated tests on a given database, like so:

python3 mongotest.py healthcare_db

About

Repo for BigData Assignment1


Languages

Language:Python 100.0%