SQL Test Kit, or how to unit test any SQL query
summary
SQL Test Kit (https://pypi.org/project/sql-test-kit/) is a Python library that unit tests real BigQuery SQL by query interpolation — it injects small test tables directly into SELECTs so no temp tables are created and queries run unchanged on BigQuery. Works for any SELECT and any data warehouse dialect, uses pandas for fixtures, and runs against live cloud services. Tradeoffs: requires internet, tests are noticeably slower than pure in‑memory tests but catch real dialect bugs.
AI-written summary · about
chapters (6)
- 0:00SQL Test Kit intro
- 3:00Testing SQL in production risks
- 6:34SQL Test Kit for unit tests
- 8:44Interpolating test data
- 10:30Advantages and limitations
- 12:21Q&A
related talks
37mYes, You Can Test SQL
27mDatabase Testing with pytest
35mTesting: Choose Your Weapons
39mUnit Testing for Data Scientists
50mAdam Furmanek: You Must Test Your Databases And Here Is How
30mHow to Test BigData/ETL Solutions?
19mEffortless Low-Code Data Testing
48mTesting the Database Layer: typical problems & best practices
