Skip to content

Instantly share code, notes, and snippets.

Avatar

Jim Williamson j-wil

View GitHub Profile
@j-wil
j-wil / cleanup.py
Created Jul 12, 2018
Delete large number of rows from very large sql tables
View cleanup.py
from sqlalchemy import create_engine
from functools import reduce
import minibar
import time
import ast
import os
eng = create_engine(os.getenv('db_config'))
table = x
take = 10000
View gist:7ed2dd009f14a45d084539203efe033f
### Keybase proof
I hereby claim:
* I am j-wil on github.
* I am jim_williamson (https://keybase.io/jim_williamson) on keybase.
* I have a public key ASBhHI4FIilR0Bp054JQCVr8O2XYKJALVi0aGKXHGaiskwo
To claim this, I am signing this object: