This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Column, Integer, String, create_engine | |
from sqlalchemy.dialects.mysql import DATE | |
from sqlalchemy.orm import scoped_session, sessionmaker | |
from sqlalchemy.ext.declarative import declarative_base | |
class Customer(Base): | |
__tablename__ = "customer" | |
id = Column(Integer, primary_key=True, autoincrement=True) | |
name = Column(String(50), nullable=False) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CREATE USER 'example'@'localhost' IDENTIFIED BY 'example_password'; | |
# GRANT ALL PRIVILEGES ON *.* TO 'example'@'localhost' IDENTIFIED BY 'example_password'; | |
# CREATE DATABASE example; | |
import sys | |
import os | |
import time | |
from datetime import date, timedelta | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String, create_engine | |
from sqlalchemy.dialects.mysql import DATETIME, DATE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne 5 ]; then | |
echo "Need the following arguments: filename, table_name, db_name, username, password" | |
exit 1 | |
fi | |
csv_filename=$1 | |
table_name=$2 | |
db_name=$3 |
NewerOlder