While running pySpark SQL pipelines via Airflow I am interested in getting out some business stats like:
- source read count
- target write count
- sizes of DFs during processing
- error records count
One idea is to push it directly to the metrics, so it will gets automatically consumed by monitoring tools like Prometheus. Another idea is to obtain these values via some DAG result object, but I wasn't able to find anything about it in docs.
Please post some at least pseudo code if you have solution.