dbt is jQuery, not Terraform
Disclaimer: I work at dbt Labs, but the opinions here are strictly my own.
And if you’re familiar with dbt, you’ll find Terraform pretty familiar: Terraform was the inspiration for dbt. The Analytics Engineering Roundup
On the surface, the comparison between dbt and Terraform feels apt.
They have a shared goal of defining resources (data models and cloud infrastructure) as code.
They share many techniques for achieving this goal – declarative configuration, a DAG with implicit resource dependencies, reusable snippets of DRY code – to name a few.
What they don’t share is how it feels to use each tool.
I can enter a flow state in dbt in a way I never can in Terraform.
I can feel my dbt models coming to life thanks to the tight local feedback loop.
I don’t need to flit between reading documentation and writing code, since dbt fits in my working memory.
I’m free to play in a dbt sandbox without worrying about bankrupting my employer.
That last feeling – play – makes working in dbt a deeply personal experience in a way Terraform isn’t.
After all, there are infinite ways to analyze a funnel, but merely seventeen ways to run containers.
dbt’s loosely coupled abstraction on top of data warehouses allows for remixing code across implementations, something not possible with Terraform’s tightly coupled abstractions.dbt is similar to serverless in this regard.
Working in dbt is more art than science, which is why the comparison to Terraform doesn’t do it justice.
The only other field that feels comparable is front-end engineering.Although there is an insane amount of science happening here to eke out every last ounce of performance.
In particular, comparing dbt to jQuery (the de facto web framework until the mid-2010s) gives me déjà vu.
Both frameworks up-skilled their users into software engineers by adopting best practices like version control and modular code.
In the process, dbt and jQuery wrote the shared playbooks for the analytics engineer and front-end engineer, respectively.
These shared playbooks bestowed employees with transferrable skills that they could take to new roles.
Employers could now test for these skills in interviews to accelerate onboarding and reduce the risk of a mis-hire.
Watering holes – both physical (meetups, conferences) and virtual (forums, Slack) – sprung up to satiate this nascent community’s needs for advice, jobs, and memes.
Being a part of these communities signaled to the world that you were a cool kid.
It wasn’t long until talent and funding flooded into the dbt community to surf this hype cycle.
Paired with dbt’s flexibility and un-opinionated nature, we’re now seeing a Cambrian explosion of third-party tools, techniques, and snippets reminiscent of diverse jQuery-enabled packages for grid layouts, interactive charts, and video playback.
Even the way we import these packages feel similar – updating a YAML file for dbt vs. an HTML script tag for jQuery.
With this shared infrastructure in place, we can finally stop building it ourselves and start delivering value; everything feels awesome.
If you’ve been following web development frameworks, you know that the story doesn’t end here.
Sure, jQuery can be found on two out of every three websites, but its mind share has dwindled to an extent that it is now considered “legacy tech”.
This is partially because Google goaded browser vendors into implementing shared web standards, thus reducing the need for a cross-browser compatibility framework.See “You might not need jQuery”
But the biggest reason jQuery isn’t the de facto framework today is because it was hard to scale to large teams.
The same flexibility that allowed small teams to deliver value quickly left behind messes of spaghetti code for large teams to maintain.
Around 2013, an upstart framework from Facebook called React burst onto the scene, promising to address these pain points by rethinking best practices, and has been the de facto web framework ever since.
In a future essay, I’ll dig deeper into the patterns underlying React’s meteoric rise and what adopting them in the data space could look like, stay tuned!