Alric le Conte

Projects / purchase-driver-models

Predictive models in the data warehouse

Seven purchase-driver models built and scored inside the business's data warehouse, with automated deployments and indicators for analysts.

Period
2024–2025
Role
MLOps and data scientist
Context
Large B2C manufacturer
Cloud
GCP
7predictive models
M+customers scored on schedule

[ Architecture ]

How it works

Run a scenario to follow a request through the system. Select a component to read its role and its flows.

Run a scenario

storageSource tablesBigQueryserviceFeature pipelineSQL · scheduledaiBigQuery ML models7 modelsstorageModel trackingversions + metricsstorageIndicator tablesscores + driversappAnalyst dashboardsbusiness analysis
batch

Scheduled scoring run

The schedule fires and refreshes every model.

ConsoleSimulated run · illustrative data
  1. Press Score the customer base to watch the request go through the system.
  1. 01Source tablesSchedule fires · latest tables read
  2. 02Feature pipelineFeatures refreshed in SQL
  3. 03BigQuery ML modelsSeven models score the customer base · version and metrics tracked
  4. 04Indicator tablesIndicator tables written
  5. 05Analyst dashboardsDashboards refreshed for analysts
  6. ✓Dashboards hold fresh scores without anyone launching a job, and every score traces back to a tracked model version.

Problem

The business wanted to understand why customers buy, model by model, in the data warehouse it already uses, and to keep the scores fresh without manual work.

Data

Customer and purchase tables in the warehouse, prepared into model inputs in SQL. The data stays in the warehouse throughout.

Approach

  • Models where the data lives. Seven models, built with XGBoost and logistic regression in BigQuery ML, with no data movement.
  • SQL preparation. The feature pipeline is versioned and rerunnable.
  • Automated deployments and tracking. Each model version is tracked with its metrics.
  • Indicators for analysts. Scores and their drivers are written to tables read through usual dashboards, refreshed on a schedule.

Evaluation

Each model was compared on held-out customers before release, and a new version is compared to the previous one before it replaces it.

Result

Seven models score millions of customers on schedule, with no manual step before analysts read the indicators.

My role

I handled the data preparation, the models, the automated deployments, the model tracking and the indicators used for business analysis.