Giter Club home page Giter Club logo

test_smart's Introduction

Setup and requirements

  • Clone the repository
  • Create a virtual environment by running python3 -m venv venv
  • Activate the virtual environment by running source venv/bin/activate
  • Run pip install -r requirements.txt to install the dependencies for task2

Task 1

Description of the database and scripts in accordance with the task1

Deploying the database via docker-compose

  1. Navigate to the task1 directory by running cd task1
  2. Run docker-compose up -d to start the database container
  3. Execute docker exec -it sqlserver bash /usr/src/app/scripts/init_db.sh to initialize the database, this will create the database (sports_web_portal) and tables (DDL scripts) and populate them with sample data (DML scripts).
  4. The database is now ready to be used, the connection parameters are:
    • Host: localhost (or db if running from a docker container)
    • Port: 1433
    • Username: sa
    • Password: VeryStrongPassword123
  5. To stop the database container, run docker-compose down -v

Task 2

  • Task2 description is available in the task2 directory task2.docx
  • Python script that reads data from CSV files via pyspark dataframe is here task2.py

Running the script

  1. Navigate to the task2 directory by running cd task2
  2. Run python3 task2.py to run the script
  3. The script will write results CSV files located in subdirectories of task2 (task2/task2_domain_fraction and task2/task2_people_count_by_company).

test_smart's People

Contributors

lexglu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.