Building data pipelines in python
summary
Building pipelines focuses on reproducibility and minimal boilerplate: use workflow managers (Luigi, Airflow, MrJob) to declare dependencies, checkpointing and retries, and avoid script soup. Python specifics: package components, write unit tests (caught a bad F1-calculation example), use coverage.py and hypothesis for edge cases, and structured logging instead of prints. Luigi tasks implement requires/output/run and targets implement target.exists; Luigi handles retries but not scheduling so trigger runs with cron or CI. Expect to spend 80% of time preparing data and automate those steps.
AI-written summary · about
chapters (21)
- 0:00Introduction and background
- 1:54R&D versus engineering
- 3:43Data quality challenges
- 4:50Goals of a good pipeline
- 5:12Pipeline design principles
- 7:02Avoiding script soup
- 8:06Workflow managers introduction
- 9:08Importance of unit testing
- 13:46Defensive programming
- 14:09Testing best practices
- 15:34Testing tools and coverage
- 17:22Building pipelines summary
- 17:43Introducing Luigi
- 19:30Luigi task structure
- 21:39Alternatives to Luigi
- 22:43Logging in Python
- 24:08Error handling and notifications
- 25:10Engineering principles for researchers
- 26:32Closing remarks and resources
- 26:56Q&A: OOP vs functional pipelines
- 30:53Q&A: Luigi scheduling
