Skip to content

Instantly share code, notes, and snippets.

View josepablog's full-sized avatar

José P. González-Brenes josepablog

View GitHub Profile
@josepablog
josepablog / to_redshift.py
Last active August 10, 2021 02:22 — forked from TomAugspurger/to_redshift.py
to_redshift.py
import gzip
from functools import wraps
import boto3
from sqlalchemy import MetaData
from pandas import DataFrame
from pandas.io.sql import SQLTable, pandasSQL_builder
import psycopg2
import codecs
import cStringIO
from io import BytesIO