The Challenge: No Data Infrastructure, No SQL Expertise
The client manufactures clear aligners and sells them through dentists, who use the client's platform to order aligners and log treatment plans for their patients.
They were growing fast, but had no data person, no data model, and no reliable way to answer basic business questions. When the CEO needed metrics for internal reviews or external reporting, he'd use AI to generate SQL queries against their PostgreSQL database, then manually cross-check the results because he couldn't fully trust what came back.
The database covered the whole manufacturing and treatment process, but it was built for the system, not for people. Anyone trying to answer a business question had to understand 165 relational tables first.
It was slow, error-prone, and not something that could scale.
There were no dbt models, no documentation, no automated quality checks. Just raw operational tables and a founder doing his best to extract truth from them.
How We Built a dbt Data Foundation from Scratch
We started by understanding the business from the ground up. Who their clients were, what they delivered as a product, what numbers actually mattered. From that, we designed simple, business-friendly dbt models that mapped directly to how the company thinks and operates, not just how the data happened to be stored in PostgreSQL.
The raw database had 165 tables, all built for the application rather than the business. Once we had the right data model on paper, we worked backwards into the database to make it a reality, modeling those 165 tables down into 8 that match how the business actually thinks, fitting the existing data into the right shape with the necessary transformations.
Along the way, we uncovered a range of data quality issues that had been quietly skewing their metrics. We documented every one of them, traced each to its root cause, and resolved them together with the development team.
The final dbt project included:
- Mart-layer dbt models built around real business concepts: dentists, patients, orders, production, and planning
- Calculated columns for the KPIs the CEO was tracking day-to-day
- dbt tests for automated data quality monitoring, so problems surface on their own rather than after a manual spot-check
- Full dbt documentation so anyone joining the team understands what every model means and where the data comes from
A deliberate decision was made early on to keep the stack lean and manageable without a dedicated data team. The client runs on the free tier of dbt Cloud, which covers everything they need and requires no internal maintenance or setup overhead. This foundation also became the backbone for the self-serve analytics layer built on top of it with Metabase. Read that case study here.
What the Business Could Finally See
Once the data matched the business, questions that used to need a data person could be answered by the team.
- Aligners ordered per dentist per month, before and after onboarding, so the team could spot super users, support them directly, and reduce churn
- A better estimate of manufacturing cost per aligner
- Patient usage visibility: which patients were or weren't wearing aligners as planned, so dentists could step in earlier and get better outcomes
Results
- Aligners ordered per dentist per month, visible before and after onboarding, so the team can spot super users and reduce churn
- A clearer estimate of manufacturing cost per aligner, instead of a rough guess
- Visibility into which patients are or aren't wearing their aligners as planned, so dentists can step in earlier
- The CEO still uses AI to query the data, but with solid dbt documentation and a clean data model underneath, the results are reliable enough that manual cross-checking is a thing of the past
- What used to be a one-person workaround is now shared infrastructure. 11 people across the company rely on the same dbt models to do their work
- Data quality issues that were silently distorting reported metrics have been identified and resolved
- dbt models now reflect how the business actually operates, not just the shape of the database schema
- Automated dbt tests catch data issues before they ever reach reporting
- A fully documented dbt project, ready for a first data hire to take over and extend
“They structured our dbt, reduced platform costs, and left documentation so thorough our team kept building on it. No dependencies, no technical debts. More than a one-time delivery, it became the foundation for reliable metrics and data-driven decisions we're still evolving today. Professional, collaborative, and genuinely focused on long-term value.”
Victor G.
CEO at ezaligner
How simple is it for you to access your data?
Take our 2-minute assessment and get a clear path forward.