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
import time | |
import signal | |
from retrying import retry | |
class Timeout: | |
def __init__(self, seconds=1, error_message='Timeout'): | |
self.seconds = seconds | |
self.error_message = error_message | |
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
# Install Apache Maven | |
cd /opt | |
wget http://www-eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
tar xzf apache-maven-3.3.9-bin.tar.gz | |
ln -s apache-maven-3.3.9 maven | |
echo 'export M2_HOME=/opt/maven' >> /etc/profile.d/maven.sh | |
echo 'PATH=${M2_HOME}/bin:${PATH}' >> /etc/profile.d/maven.sh | |
source /etc/profile.d/maven.sh |
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
#!/usr/bin/env python3 | |
# Create tables and insert data into SQL Server 2014 from all CSV files in a directory. The process involves: | |
# - Read all CSV files in a directory | |
# - Ensure all headers are the same | |
# - Generate DTS (Data Transformation Service) files for all CSV files | |
# - Execute all .dtsx files to bulk insert the CSV | |
import os |
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
import sys | |
import logging | |
'''Usage: | |
from database import Database | |
db = Database(attributes) | |
db.connect() | |
sql = "SELECT * FROM TABLE" | |
dataframe = pandas.read_sql(sql, db.connection) |
NewerOlder