← All case files
// case file
CASE / 07
KPI Reporting
SNOPYTSQLWOR
SOURCESTRANSFORMKPI MARTKPI AKPI BKPI CCASE 07AUTOMATED KPI REPORTING
● Shippedcase file · 07 / 16
Case
#07
Where
Yosi Health
Categories
Snowflake · Python · Optimization
Read
~2 min
/07

Automated KPI Reporting Pipeline

SnowflakePythonSQLWord/PDF
Fully automated extraction → templated Excel charts → Word reports → PDF distribution. ~80% reduction in manual reporting time.
+
The Problem

Customer Success was spending two full days every week assembling a recurring KPI report — pulling SQL exports, copying values into Excel templates, refreshing charts manually, then re-typing summaries into a Word doc and exporting to PDF. The same humans were doing the same clicks every Monday.

The Approach

Designed a parameterized Python pipeline that reads customer config from a control table, runs templated Snowflake queries, populates an Excel workbook (preserving formatting and pivot logic), and injects the results plus auto-generated narrative into a Word template via python-docx. Final step exports to PDF for leadership distribution.

Technical Details
  • Parameterized SQL with config-driven date windows and tenant filters
  • openpyxl for chart-preserving Excel population
  • python-docx with bookmarked placeholder injection
  • Reusable across 30+ customers with no code changes
  • Scheduled via cron with email distribution on success
~80%
Time saved
30+
Customers
Weekly
Cadence