The Auction: Week 8

The Auction

Next drop Monday Nov 9, 16:00 UTC

Week 8

hosted bydatadriven

Results

next drop

8 scored

26 submissions

first in mohamed_eid, 18h 40m

Your DAG2026-11-07 · night 30 of 30

ad_events285,128 rows
accounts14,872 rows
ad_events_history
accounts_history
ad_impressions
ad_impressions
  • impression_idTEXT
  • customer_idTEXT
  • served_atTEXT
  • served_dateTEXT
  • slotTEXT
  • clickedINTEGER
  • billed_microsINTEGER

The challenge

You're a data engineer at a search engine that shows a few ads above and below its results, each slot sold at auction the moment someone searches. Advertisers pay only for clicks, and the inventory team, which sells that ad space, needs 1 clean row per ad shown: whose it was, where it sat, and what it billed. Each night, a job copies 2 raw tables out of 2 systems. The ad server provides ad_events, a log with a row for every ad shown, every click on one, and every verdict its click-fraud filter reached about a click. Billing provides accounts, a nightly snapshot of the advertiser accounts that are open. Write the DAG that builds the inventory team's table of ads shown from to ; billing's month ended .

The mess

The serving build, the click server and the fraud filter came from 3 teams, each with its own words and clock. An older serving build still runs on part of the fleet. The fraud filter keeps reviewing a click for days after it happens. Each data center ships its log on its own schedule. The copy job was patched under pressure more than once.

Raw tables

ad_events
accounts

Target table

ad_impressions

Click a column for what it holds, or click the bottom of a sheet to see its sample rows.

Notes from the inventory team

  • A price is in micros, 1,000,000 to the unit, and a multiple of 10,000.
  • An advertiser's day and month are those of the account's own time zone.
  • An ad takes the zone of the latest copy before it, else of the first copy.
  • A verdict reached after its click's month closed counts the month after.
  • A click reaches the log through the link in the ad.

How you're scored

  • +1the right value. A right null counts.
  • 0null where the source held a value. Silence is free.
  • −1a wrong value. Silent corruption costs.
  • −2a row that should not exist: no matching key, or a second row for the same key. The last row for a key is the one scored.
Questions go in this week's thread.