GithubHelp home page GithubHelp logo

update-mysql's Introduction

Updating MySQL Database

Overview

This folder contains scripts for updating the MySQL database. Currently, these tables are hosted in GoogleSheets. This script will work to replace those processes with a MySQL database.

Safety

PLEASE use caution when running these scripts. They are designed to update the database, and if run incorrectly, could cause data loss. Please make sure you have a backup of the database before running these scripts.

Each script should only be run once. Running the script multiple times will cause duplicate entries in the database in many cases.

Setup

  1. Must be connected to the CourseKey VPN
  2. Create a .env file in the same directory as the script. See below for details.
  3. Install the required packages with pip install -r requirements.txt
  4. Run only the necessary scripts. See safety section above.

Running the Script

Each table has its own script. The creation of tables is left in and commented out in case the tables need to be recreated. Each table should have a corresponding action in the script to update the table.

Environment Variables

GOOGLE_CRED: The Google Cloud credentials json. This is used to authenticate with the Google Cloud SQL API. This is required for the script to run.
MYDB_PASS: The password for the MySQL leadershipDashboard user. This is required for the script to run.
HUBSPOT_KEY: The HubSpot API key for pulling all company and deal data. This is required for the script to run.

.env file should look like this:

GOOGLE_CRED={json Google Credentials}
MYDB_PASS='password'
HUBSPOT_KEY='key'

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.