complete script for coroutine-based etl pipeline