Tagged “analytics-engineering”
4 posts
Semantic dbt tests on Databricks: 50,000 real reviews through a Unity Catalog function
I took four dbt tests written as English sentences off my laptop and onto Databricks. The schema.yml didn't change. Everything underneath it did, and the 50,000-review production run failed its own gate by one point of recall, which turned out to be the most interesting part.
|13 min readSemantic dbt tests: data quality checks in plain English
not_null and accepted_values will happily pass a customer called Mickey Mouse, a return coded late whose comment says the box arrived crushed, and a ticket with someone's IBAN in it. So I wrote four dbt tests as English sentences and scored them against an answer key.
|12 min readSessionization with SQL window functions
A stream of events isn't sessions until you decide where one visit ends and the next begins. You can do that in three window functions — no self-joins, no Python — and the whole thing hinges on the same frame-clause detail that trips people up on running totals.
|6 min readSQL window functions: a practical guide
Window functions are the single highest-leverage SQL feature for analytics work, and the frame clause is the part everyone skips — right up until their running total is silently wrong. Here's the whole thing, practically.
|5 min read