learn-analytics-engineering-with-phoebe / Leader session 4 of 6
Learn Analytics Engineering with Phoebe · Leader track · Session 4 of 6

Buy vs build the transformation layer

This is the session where money is involved, so it is the session where vagueness is expensive. There are four real options for where your SQL transformations live, and they are not four points on a quality scale: they are four different things to own. Sessions a2 and a3 argued that models belong in code and that tests are a governance artifact. Neither of those arguments tells you what to sign. This one does, and it starts with two numbers you can count this week.

🟡 Leader track Heads of data · analytics leads · stakeholders No code to write 45 min
0-3 · Frame the decision 3-16 · The four options 16-24 · The honest cost list 24-45 · Score your own estate
Part 0

What is actually being decided

Most transformation-tool decisions are made backwards. Somebody sees a demo, likes it, and the business case gets written to fit. The result is a team that pays the full adoption cost of a tool and gets a fraction of the benefit, because the two things that determine the benefit were never counted.

So this session refuses to start with products. It starts with your estate: how many transformations you have, how many people touch them, what infrastructure you already pay for, and who would inherit the whole thing if the person who built it resigned on Friday. Answer those and the shortlist writes itself. Answer none of them and you are choosing a vendor by vibe.

Live - presented in session Self-study - read after class ◆ Discussion - run it with your team Sources covered
★ What you walk out with today A four-option map with what each option is genuinely for, a decision frame that starts with two countable numbers rather than a feature grid, an honest list of what adoption costs beyond any invoice, and the questions that make your own team's answer visible in one meeting.
Part 1 · covers the dbt documentation and software-engineering practice applied to SQL

The four options, and what each is for 13 min live

dbt is the subject of this course, so it appears twice below: once as software you run yourself and once as a commercial service you buy. Treating those as one option is the single most common mistake in this decision, because the capability is the same and the thing you are buying is completely different.

Four options. Not a quality scale - four different things to own. 1 · dbt Core self-hosted, free, open Buying: nothing. The whole tool, run on a CI runner you already pay for. Right when you have engineers, a CI habit, and someone who will own upgrades. 2 · dbt Cloud the commercial service Buying: operations and onboarding. Managed scheduler, browser editor, permissions. Right when the constraint is people and process, not capability. Same models either way. 3 · Your ELT vendor's own transformation layer Buying: convenience. One vendor, one bill, one login, no extra runner to own. Also buying their roadmap. Leaving later is a rewrite, not an export. 4 · SQL scripts plus an orchestrator Buying: nothing, and owing everything. Genuinely right below about fifteen models. Genuinely painful above it: build order, tests and docs all become your problem. The categories outlive the products. In five years the names on this page may have moved or merged. The four shapes will not: run it yourself, buy the operations, take whatever your loader ships, or roll your own. Learn the shapes and every future vendor conversation is short.
🔍 Click to zoom - four things to own, not four tiers
OptionWhat you are really buyingWhen it is the right answer
dbt Core
self-hosted
Nothing. The full capability is in the free, open tool: models, dependency order, tests, generated docs. You supply the machine that runs it, on a schedule something else provides. You have engineers, a version-control habit, and a continuous-integration runner already in use for other things. Somebody is willing to own version upgrades as a standing job.
dbt Cloud
the commercial service
Operations and onboarding. A managed scheduler you do not maintain, a browser editing environment for people who will not use version control on their laptop, and a permissions and access story that does not have to be assembled. Your constraint is people, not capability: analysts you want editing models who will never install a local toolchain, or no platform team to hand a runner to. Buy it for the operating model, not for better SQL.
Your ELT vendor's own layer Convenience, and coupling. One vendor, one bill, one login, no separate runner, and transformations that sit next to the pipelines feeding them. You are small, already committed to that vendor, and the transformation work is modest. Accept honestly that your transformation roadmap becomes their roadmap, and that migrating out is a rewrite rather than an export.
Hand-rolled SQL plus an orchestrator Nothing, and you owe everything. Build order, test execution, documentation and lineage all become work somebody on your team does by hand, forever. Genuinely right below roughly fifteen models with one editor. Genuinely painful above that, and the pain arrives as a slow tax rather than an outage, which is why teams stay past the point where it made sense.
LiveSay the Core-versus-Cloud sentence out loud4 min▶

Here is the sentence, and it is worth being blunt about it in front of a procurement conversation: the commercial service does not make your models better, faster or more correct. It makes them somebody else's operational problem.

That is a real and often excellent thing to buy. Managed scheduling means nobody on your team is paged at 3am for a runner that ran out of disk. A browser editing environment means an analyst who is fluent in SQL and uninterested in local tooling can contribute a model this month rather than next quarter. A permissions model that already exists means you are not inventing one.

But notice what none of those are. None of them is a model you could not otherwise have built. If someone tells you the paid tier produces better transformations, they have moved from operations to marketing, and you should ask them to point at the capability.

The procurement test Ask the vendor to finish this sentence: "with this, your team stops doing X themselves." If X is a real operational chore you can name, the case is sound. If X turns out to be "writing bad SQL", the case is not.
LiveThe coupling question, asked properly4 min▶

Option 3 is the one most often chosen by accident. Your loader already runs, it grew a transformation feature, and using it is one click cheaper than any alternative. That is a legitimate reason to start there. It stops being legitimate when nobody has asked the exit question.

  • Where do the transformations physically live? If they exist only inside the vendor's interface, you do not have a codebase, you have a configuration. Session a2's whole argument about review and rollback quietly does not apply.
  • Can you read them without logging in? Files in your own repository are portable. Definitions inside a product are not, however good the product is.
  • What happens to your transformation roadmap? It becomes a subset of their roadmap. If they de-prioritise the feature you need, your only options are waiting or leaving.

None of that makes the option wrong. It makes it a decision with a term attached, and the honest version is: "we are choosing convenience now, and we accept that changing our mind is a rewrite."

Self-studyWhy option 4 survives longer than it should3 min read▶

Below about fifteen models with a single editor, hand-written SQL plus a scheduler is not a compromise. It is correct. There is no build step to explain, no dependency to install, no templating layer, and one person can hold the whole thing in their head. Introducing a transformation tool there is pure cost.

The problem is that the failure mode above that line is invisible. Nothing breaks loudly. Instead: the run order lives in a document that is slightly wrong, a validator exists that somebody sometimes remembers to run, two scripts compute the same number differently, and onboarding a new analyst takes six weeks because the knowledge is in one head. Every one of those is a tax, none of them is an incident, and taxes do not generate decisions.

This course's own project is the measured version of that. The same marketplace warehouse exists twice: by hand as 8 SQL files plus a 27-check Python validator that somebody has to remember to run, and as a dbt project of 23 models with 100 tests that run on every build. Both produce settled net revenue of 111,906.48 over 957 orders, average order value 116.93, identical to the cent. The tooling changed nothing about the answer and everything about who has to remember what.

Part 2 · the frame that replaces the feature grid

Two numbers, then four questions 6 min live

Feature grids are how vendors win decisions, because every row can be answered yes. Counting is how you win them, because the two numbers below decide roughly ninety per cent of this and neither one is in anybody's sales deck.

Count first. The shortlist writes itself. Number 1 · how many models? Count the distinct transformations that produce something a person or dashboard actually queries. Under fifteen, scripts win. Over thirty, they do not. Number 2 · how many editors? One person can hold a script estate in their head. Two cannot. Two editors means you need review, review needs a diff, and a diff needs the code. Read the two numbers together Few models and one editor: buy nothing, and revisit in six months. Adopt when either number crosses. Once you are adopting, Core versus Cloud is an operations question, not a capability one. Then four questions, in this order. Do you need a scheduler, or own one? If a scheduler already runs your loads, a managed one is your second. That is a cost, not a feature. Who reviews a model change? Name the person. If nobody reviews, you buy the whole cost and none of the benefit. See a5. What happens when the builder leaves? Conventions plus generated docs survive a resignation. A clever script estate does not. See a6. Which pieces do you already own? A code host, a CI runner, a warehouse, a scheduler. Most teams own three of the four before they start.
🔍 Click to zoom - two numbers, then four questions
LiveWhy the editor count matters more than the model count4 min▶

Model count is the number people quote, because it sounds like scale. Editor count is the number that actually decides, because it is the number that makes coordination a cost.

With one editor, everything a transformation tool provides can be substituted by memory. She knows the run order. She knows which script is stale. She knows the number is wrong on Mondays. It is not written down and it does not need to be, and the estate runs fine right up until she takes annual leave.

With two editors, memory stops working, because two memories disagree and nothing arbitrates. That is the moment you need the change to be visible before it ships, which is review, which needs a diff, which needs the definitions to be files. Everything in session a2 follows from the editor count going from one to two.

The uncomfortable corollary A team with forty models and one editor has a succession problem, not a tooling problem. Buying a tool will not fix it, and hiring a second editor will surface it in about a week.
Self-studyWhat a fifteen-model estate looks like from the inside3 min read▶

Fifteen is not a magic threshold, it is where three separate costs happen to cross at once for most teams.

  • Build order stops being obvious. With eight steps, the order is a paragraph. With twenty-three, it is a graph, and this course's project has 47 dependency edges between 32 nodes. Nobody maintains that by hand accurately, and the failure is silent: a model built from yesterday's input still returns rows.
  • Manual checks stop being run. The hand-built version of this warehouse has a validator with 27 checks. It works perfectly and it is optional, which over a year means it runs about as often as anyone remembers.
  • Nobody can answer "what breaks if I change this". Which turns every rename into either a three-week discovery process or a decision not to rename, and estates that stop renaming things accumulate names that lie.

If two of those three are already true for you, you are past the line regardless of your model count.

Part 3 · the part that is not on the invoice

What adoption actually costs 5 min live

If you present this decision as a licence line, you will be believed and then blamed. The licence is the small part, and on option 1 it is zero. The real cost is a change to how work happens, and it lands on the same people who are already delivering.

What the licence line says dbt Core: zero dbt Cloud: a subscription ELT vendor's layer: folded into a bill you pay Scripts plus an orchestrator: zero So three of the four options look free What adoption actually costs a build step in front of every change a language runtime to install and keep current templating mixed into SQL people already know conventions to agree, then actually enforce a team learning three new things at once The sunk-cost trap, and it is the expensive one Migrations move the existing model across unchanged, because that is cheap and shows progress. You now have a wrong shape in a good tool: built faster, spread wider, tested against itself, and referenced by a dozen downstream models. Fix the model first. The tool will not have an opinion.
🔍 Click to zoom - three of four options look free and none of them are
LiveThree new things at once is the real risk4 min▶

Ask a team to adopt a transformation tool and you have usually asked them to learn three unrelated skills in the same quarter:

  • Version control as a daily habit, not an occasional backup. Branches, review, merge conflicts, and the discipline of not editing production directly. Session a2 is about why this is worth it; it is still a real learning curve.
  • A templating layer inside their SQL. Analysts who are genuinely fluent in SQL now see syntax that is not SQL in the middle of it. This is the thing they complain about, and the complaint is fair for the first month.
  • A layering convention. Which model belongs where, what staging is allowed to do, what a mart is for. This is the part that determines whether the estate is maintainable in two years, and it is the part with no error message.

You can sequence these. Version control first, on the existing scripts, before any tool arrives. Then the tool. Then, once models are landing, tighten the conventions. Teams that try all three in one sprint produce a project that technically builds and that nobody wants to touch.

What to budget Not licence. Budget the review time of your most senior person for a quarter, because their reviews are the mechanism by which conventions become real. If you cannot spare that, delay the adoption rather than skipping the reviews.
Self-studyThe one cost that is genuinely zero3 min read▶

Documentation and lineage. Not cheap: zero, once the models are in the tool. Descriptions live beside the columns they describe, and the dependency graph is derived from the code rather than drawn by a person. This course's project has a lineage graph of 32 nodes and 47 edges, read from the project's own build output, and nobody maintains it.

That is worth pricing into this decision honestly, because it is the benefit leaders systematically undervalue. A diagram somebody drew is out of date the week after the offsite. A graph derived from the code cannot be out of date, because if it were wrong the build would not have worked. Session a6 is entirely about that difference, and it is the strongest single argument in the business case.

Discussion · 18 min · everyone participates

Score your own estate ★ no code, no laptops

Three exercises. The first one is runnable in your next team meeting with nothing but a whiteboard, and it is the one that most often changes the decision.

Count, out loud, in the room. Two numbers on the board: transformations, and editors. No estimates. If the room cannot agree on either number, that disagreement is your finding.

Cross off what you already own. Code host, CI runner, warehouse, scheduler. Every one you own moves the answer away from buying operations.

Run the leaving test. Name the person who inherits this if the builder resigns on Friday, and ask them, in the room, what they would need.

Only now look at options. If you started here, start again.

LiveExercise 1 · the two numbers, out loud7 min · run this in your next team meeting▶

The prompt. "Before this meeting ends, I want two numbers on the whiteboard. First: how many distinct transformations do we have that produce something a person or a dashboard actually queries? Second: how many different people edited at least one of them in the last ninety days? Not estimates. Actual counts, and if we cannot produce them today, say so."

What a good answer sounds like. Somebody says a number, somebody else says "it depends what you count as a transformation", and the room spends four minutes agreeing a definition. That argument is productive: it is the first time anyone has drawn a boundary around the estate. You end with two numbers and a shared definition, and often with the discovery that the count is roughly double what the leadership team assumed.

The failure mode to listen for. Instant confident agreement. "About twenty, and it is basically just me and Ravi." If the numbers arrive with no argument and no source, they are recalled rather than counted, and the recalled version is always smaller and always missing the scripts on somebody's laptop. Ask where the list is written down. If the answer is nowhere, your first number is not a count, it is a hope.

LiveExercise 2 · what do we already own6 min▶

The prompt. "Four pieces of infrastructure sit under this decision: a place to store and review code, a runner that executes things on a trigger, a warehouse, and a scheduler. Which of those four do we already pay for and already use, today, for something else? For each one we own, tell me who administers it."

What a good answer sounds like. Three of the four named, each with an owner: "the platform team runs the code host and the CI runner, the warehouse is ours, and there is a scheduler running the loads that the data engineering team owns." That answer moves you decisively toward self-hosting, because the thing the commercial service sells you is operations you have demonstrably already bought.

The failure mode to listen for. "We have a CI runner but nobody has permission to add jobs to it." That is not owning it. Shared infrastructure you cannot get a change into behaves exactly like infrastructure you do not have, and it is a common reason a self-hosted plan quietly fails six weeks in. Push until you get either a named administrator who has agreed, or an honest no.

Self-studyExercise 3 · the leaving test5 min▶

The prompt. "Suppose the person who built our current transformation setup resigns on Friday with no handover. Name the individual who picks it up on Monday. Now, in front of everyone, ask that person what they would need in order to be productive within a week."

What a good answer sounds like. The named person says something concrete and slightly damning: "I would need to know what order things run in, and I would need somebody to tell me which of the two revenue queries is the real one." That is a specification for what your tooling and conventions have to produce, written by the person who will actually need it.

The failure mode to listen for. Laughter, then "honestly, we would just rebuild it." That is a truthful answer and it is also the entire business case, quantified. Rebuilding a working estate because nobody can read it is the most expensive thing on this page, and it does not appear on any invoice.

Real world

The most common wrong answer to this session is buying the operations you already own. A team with a code host, a CI runner and a scheduler already in production, run by a platform group that is happy to add a job, buys the managed service anyway, for the browser editor. Then two analysts use the editor for a month and go back to asking the analytics engineer. What was purchased was a second scheduler, a second permissions model and a second place where definitions live. The capability was free the whole time. Conversely, a five-person team with no platform group, no CI habit and one very good analyst who has never used version control should probably buy the managed service on day one, because their scarce resource is operations attention and that is precisely what is for sale. Same decision, opposite answers, and the deciding factor was never the feature list.

Take this back to your team

Questions to ask your data team use them this week

Six questions. None of them is about features, and each one is designed so that hesitation is as informative as the answer.

AskWhy it works
"How many transformations do we have, and how many people edited one last quarter?" These are the two numbers that decide the whole thing, and almost nobody has counted either. Whatever comes back, you have moved the conversation from products to your own estate.
"If we buy the managed version, which specific chore do we stop doing ourselves?" Forces the case to be operational. A good answer names a chore. A weak answer describes a capability you already have for free, which is the signal to slow down.
"Do we already have a scheduler, and would this be our second one?" Reveals duplication before you pay for it. Two schedulers is not redundancy, it is two places to look when something did not run.
"Who reviews a change to our headline number today, and what happens if they say no?" If nobody reviews, no tool will help, because review is the mechanism the tooling exists to serve. Session a5 is entirely about this answer.
"If we migrate, what moves first, and are we confident that model is right?" Surfaces the sunk-cost trap while it is still cheap. Migrating a wrong shape into a good tool makes it faster to build and much more expensive to fix.
"What would we have to rewrite if we left this vendor in two years?" Prices the coupling. If the answer is "everything, because the definitions live in their interface", you are choosing a term, not a tool, and that should be said out loud.
Homework

Before session a5 ◐ 30-40 min total

Source material

Sources covered

This page covers:

✓The dbt documentation - what the open tool does, and what the commercial service adds operationallyPart 1 · treated as a decision. No pricing, no screenshots: a product tour would be stale before delivery
✓Software-engineering practice applied to SQL - build steps, dependencies, review, environmentsParts 2-3 · the adoption cost list and the editor-count argument
◐The community layering conventionsPart 3 · named as the cost with no error message; taught properly in a2 and the builder track
◐Kimball & Ross - the model you would be migratingPart 3 · the sunk-cost trap only. The model itself is learn-data-modeling
Check yourself

Three questions before you go 🎯 ◐ 90 seconds

1 · Your team has 34 models, four editors, a code host, a CI runner and a scheduler the platform team already operates. What is the most defensible choice?

Both numbers say adopt a transformation tool. But the commercial service sells managed scheduling, a browser editor and a permissions story, and this team already owns the equivalent of all three with a group willing to run them. Buying it here purchases a second scheduler and a second place for definitions to live.

2 · A vendor tells you their transformation layer will "improve the quality of your data models". What is the right response?

No transformation tool has an opinion about your grain or your definitions. This course's project proves it from the other direction: the same warehouse built by hand and built with dbt produces settled revenue of 111,906.48 both ways, identical to the cent. What changed was who has to remember the run order and whether the checks run. Any claim about quality is a claim about operations wearing a different coat.

3 · You are approving a migration. The team proposes lifting the existing revenue model across unchanged in week one, to show progress. What is the risk you should name?

This is the sunk-cost trap, and it is the most expensive thing in the session. A transformation tool makes a good model cheaper to maintain and a bad model faster to spread. Fix the definition before the migration, while exactly one thing depends on it.

Leader session 4 cheat sheet · pin this

Four optionsSelf-host the open tool · buy the managed service · take your loader's layer · roll your own.
What Cloud sellsOperations and onboarding: managed scheduling, a browser editor, permissions. Not capability.
Two numbersModel count and editor count. Under fifteen with one editor, buy nothing.
Editors decideOne editor runs on memory. Two need review, review needs a diff, a diff needs files.
Four questionsScheduler already? Who reviews? What if the builder leaves? What do we already own?
The real costA build step, a runtime, templating in the SQL, and three new things learned at once.
The trapMigrating a wrong model into a good tool: built faster, spread wider, dearer to fix.
Categories outlive productsNames change, the four shapes do not. Next: a5, who actually runs it.