Projects · Bertelsmann · 2024

Marketing workflows on Snowflake

Marketing workflows moved from Databricks to Snowflake for daily BI and ML.

The situation

Marketing workflows at Bertelsmann had to serve two teams from one dataset. BI analysts planned campaigns for North and South Germany. Data scientists used the same rows for churn prediction and next-best-offer models. The table had to be clean, version-controlled, and refreshed every day.

What was in the way

The work ran in Databricks notebooks. A notebook loaded the file with pandas, cleaned it, built recency, frequency, and spend segments, grouped German regions, and exported a file for BI and ML. A small cluster took 10 to 15 minutes to start and another 10 to 15 minutes to run, at about €2 to €5 a run. The notebooks were hard to version-control, BI and ML shared the cluster, and a notebook change could break the next run.

What changed

We moved the workflows to Snowflake. Snowpipe loaded new files. SQL on elastic compute cleaned the data and built the regional and model tables. dbt kept the models in Git. Time Travel covered recovery. Zero-copy clones made test copies. Resource monitors capped warehouse cost.

What was delivered

A daily pipeline, a clean table, regional segments for campaign planning, and a table ready for churn and next-best-offer models. The models were version-controlled in dbt.