Skip to content

Instantly share code, notes, and snippets.

View j-wil's full-sized avatar

Jim Williamson j-wil

View GitHub Profile
@j-wil
j-wil / cleanup.py
Created July 12, 2018 20:39
Delete large number of rows from very large sql tables
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
### 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: