In This Article
- Executive Summary
- Where the Collision Actually Happens, and Where It Does Not
- Why Version-Controlled Transformation Code Is Better Evidence
- The Genuine Gaps: What Version Control Does Not Give You
- Scoping GxP: Classify Models by What They Feed
- Tests Are Not Qualification
- Environments, Data, and the Promotion Path
- Rewriting the Validation Deliverables
- A Practical Sequence for Getting There
- Conclusion
- For Further Reading
- References & Sources
Executive Summary
Analytics engineering arrived in pharma from the technology industry with a simple premise: data transformations are software, so they belong in a repository, under review, with tests, deployed through a pipeline. Quality organizations built around documents, signatures, and screenshots often treat this as a compliance problem. It is usually the opposite. A version-controlled transformation layer produces better validation evidence than the spreadsheet-and-screenshot approach it replaces, because every change carries an author, a timestamp, a reviewer recorded in the merge, and an exact statement of what changed.
That is the spine of this article. It is not a claim that code-based analytics is automatically compliant. There are a few real gaps, and they matter: repository history can be rewritten by anyone with enough permission, commit authorship is self-asserted unless it is signed, and a repository is not a records archive with a retention period attached. Those gaps are narrow and fixable, but they have to be named and closed with controls rather than assumed away.
We cover five things: why the collision between analytics engineering and validation culture is mostly superficial, where it is genuinely real, how to scope GxP proportionately so that not every model in the warehouse carries the full burden, the difference between a test that runs on every build and a qualification that demonstrates fitness for intended use, and how to demonstrate environment separation and a controlled promotion path. dbt is the concrete example throughout because it is the most common implementation, but the argument holds for any framework where transformations live in a repository.
Where the Collision Actually Happens, and Where It Does Not
The story most quality leaders hear is that a data team has started building the reporting layer in dbt, that everything now lives in a git repository, and that the old validation package does not fit. The specifics vary. The reaction is consistent: this looks new, therefore it looks risky.
It is worth separating the parts of that reaction that are correct from the parts that are habit. Validation expectations in pharma have never actually required a Word document. They require that a system used for a regulated purpose is shown to be fit for its intended use, that changes are controlled, that records are attributable and durable, and that someone competent reviewed the work. The document was the medium, not the requirement. FDA’s Computer Software Assurance guidance for production and quality management system software, finalized in September 2025, makes the point explicitly by asking for assurance activities scaled to risk and for records that capture what was actually done, rather than for a fixed set of paperwork applied uniformly.12
GAMP 5 Second Edition, published by ISPE in 2022, moved in the same direction. It updated the original guide to accommodate iterative and incremental development, continuous delivery, and modern service models, and it treats the linear waterfall lifecycle as one option rather than the default.14 If a validation approach for analytics engineering feels like it has no precedent, that is usually a sign that the organization is still working from the 2008 mental model rather than from current guidance.
The three things that genuinely change
Three shifts are real, and they are the ones worth spending governance attention on.
The unit of change gets much smaller and much more frequent. A traditional validated reporting system might change four times a year through formal change control. A transformation repository might change four times a week. The controls have to work at that cadence or people will route around them. This is the single most common failure. An organization keeps a change control process designed for quarterly releases, applies it to a weekly pipeline, and within two months half the changes are being made directly in the warehouse outside the repository, which destroys the evidence trail the repository was supposed to provide.
The boundary of the system becomes harder to draw. A validated LIMS has an obvious perimeter. A warehouse with 600 models feeding dashboards, notebooks, regulatory extracts, and a commercial forecast has no natural perimeter at all. Scope has to be asserted deliberately, model by model, and enforced mechanically. That is the subject of a later section and it is where most of the real work sits.
Evidence becomes generated rather than composed. In a document-driven approach a person writes down what was tested and attaches a screenshot. In a code-driven approach the build produces a record of what ran, against which commit, in which environment, with which result. That is a better record, but only if someone deliberately keeps it. Build logs that expire after 90 days are not a validation record.
The framing that works with quality organizations: analytics engineering does not ask regulators to accept less evidence. It asks them to accept evidence in a different container. The right conversation is not “can we validate dbt” but “here is the evidence this approach produces, here is how it maps to what you already ask for, and here are the three places it falls short so here are the controls we added.”
Why Version-Controlled Transformation Code Is Better Evidence
Start from what the spreadsheet-based reporting layer actually looked like in most mid-size pharma and biotech organizations, because that is the honest comparison. An analyst pulled an extract, applied logic in a workbook, saved a copy with a date in the filename, and mailed it. If a number was later challenged, reconstructing how it was produced meant finding the right version of the file, opening the formulas, and asking the analyst what they remembered. Change control existed on paper. In practice the record of the transformation was the file itself, and the file could be edited without leaving a trace.
Against that baseline, a transformation repository is not a compliance risk. It is a substantial improvement, and the improvement lines up closely with the data integrity attributes regulators already use.
The ALCOA+ mapping
ALCOA+ is the shorthand for the data integrity attributes set out in the MHRA GxP data integrity guidance and reinforced in PIC/S PI 041-1: attributable, legible, contemporaneous, original, and accurate, plus complete, consistent, enduring, and available.45 Applied to the change record for a transformation, a well-run repository maps unusually well.
| Attribute | What the repository provides | What still has to be added |
|---|---|---|
| Attributable | Every commit carries an author. Every merge records who approved it and when. | Signed commits, so authorship is verified rather than self-declared. Identity linked to the training record. |
| Legible | The diff is the change. A reviewer sees exactly which lines of logic moved and what replaced them. | A commit message convention that states intent, not just mechanics. |
| Contemporaneous | The change is recorded at the moment it is made, not reconstructed afterward. | Reliance on server-side merge and build timestamps, since local commit times are client-supplied. |
| Original | Each commit is an immutable object identified by a content hash. Nothing is overwritten in place. | Controls that prevent history rewriting, which is the one place this breaks. |
| Accurate | Tests execute against the change before it merges and again on the production build. | Evidence that the tests were meaningful, reviewed, and traced to a requirement. |
| Complete | The full history is present, including changes that were reverted. | Coverage of work done outside the repository, which has to be prohibited rather than tolerated. |
| Consistent | Commit parentage gives a strict, verifiable ordering of events. | Nothing significant. |
| Enduring | Every clone is a full copy, so the history is replicated by design. | A retention period, an archive location, and a way to read it after the platform changes. |
| Available | Any historical state can be reconstructed on demand. | An access path for auditors that does not require a developer to drive it. |
Read that table honestly and the picture is clear. Five of the nine attributes are satisfied better by a repository than by any document-based process. Three need a specific control added. One, endurance, needs a records decision that has nothing to do with the tool.
Why this fits how FDA now thinks about assurance
The CSA guidance asks organizations to think about the intended use of the software, the risk if it fails, and then to select assurance activities proportionate to that risk, keeping records that capture the activity and the result.13 A transformation repository with continuous integration produces exactly that kind of record, and it produces it automatically for every change rather than only for the changes someone remembered to document.
The same logic runs through the current expectations for computerized systems more broadly. The 2011 EU GMP Annex 11 already required change control, audit trails, and evidence of validation appropriate to risk.6 The 2025 draft revision, published for consultation in July 2025, expands that from a five-page annex into a nineteen-page document covering supplier oversight, identity and access management, expanded audit trail expectations, and cybersecurity.7 The concept paper behind the revision is explicit that the original text no longer reflects how systems are actually built and operated.8 A change record that is generated as a side effect of doing the work is a better answer to that direction of travel than a change record assembled after the fact.
The clinical parallel
Anyone who has worked in clinical programming has seen a version of this argument settled already. Statistical programming groups have kept SAS and R programs under version control for years, and the derived dataset is understood to be reproducible from the program plus the source data plus the environment. ICH E6(R3), adopted at Step 4 in January 2025, treats data governance as a shared sponsor and investigator responsibility and puts weight on traceability from source through to the reported result.13 FDA’s 2024 questions and answers guidance on electronic systems in clinical investigations takes a similar risk-based line on validating the systems that create and maintain those records.12 The transformation layer in a warehouse is the same problem in a different department.
The Genuine Gaps: What Version Control Does Not Give You
If the argument stopped at the mapping above it would be a sales pitch rather than an assessment. There are real weaknesses, and quality reviewers find them quickly. Naming them first is more persuasive than being caught by them.
Gap one: history is immutable by convention, not by construction
The claim that git history cannot be altered is not true. Commits are content-addressed, so a commit cannot be edited in place, but the branch pointer can be moved to a rewritten history. Amending a commit, rebasing a branch, and force pushing all replace the recorded sequence with a different one, and the standard tooling documents how to do it.24 With sufficient permission on the hosting platform, someone can rewrite the history of the main branch and the previous version becomes unreachable.
That is a genuine difference from an audit trail in a validated application, where the trail is enforced by the application and not by the operator’s restraint. The fix is straightforward but it has to be deliberate. Branch protection or repository rulesets on the production branch, blocking force pushes and branch deletion, restricting who can bypass, and recording bypass events, converts an assumption into a control.2223 The important shift is one of framing: branch protection stops being a developer convenience and becomes a documented GxP control with an owner, a configuration baseline, and a periodic review.
Gap two: authorship is self-asserted
By default the author recorded on a commit comes from local configuration. A user can set it to any name and address. For attribution that has to hold up, commits on protected branches should be cryptographically signed, and the platform should reject unsigned commits.2523 The signing identity then needs to be tied back to a named individual whose training record and role authorization exist in the quality system. Without that link, the repository shows that someone with a particular key made a change but not that the person was qualified to make it, which is what 21 CFR Part 11 and Annex 11 are both reaching for.96
Gap three: timestamps come from the client
Commit timestamps are supplied by the machine that made the commit. They are usually right and they are trivially falsifiable. For contemporaneity that will survive questioning, rely on server-side events: the merge time recorded by the hosting platform, and the start and end times of the continuous integration run. Those are generated by systems the developer does not control. Where the validation record needs a time, use those rather than the commit time.
Gap four: a repository is not a records archive
This is the gap that gets missed most often, and it is the least technical. A repository holds the current history for as long as the organization keeps paying for the platform and nobody deletes it. GxP records have defined retention obligations tied to the product, not to the tooling. The predicate rules set retention against events like batch expiration and distribution, which routinely exceed the life of any particular analytics platform.10 FDA’s data integrity questions and answers guidance is direct that records must remain accessible and readable throughout the retention period.11
What has to be added is a records decision, not a feature:
- Define what the record is. Usually the tagged release, the resolved project manifest for that release, the test results from the qualification run, and the approval. Not the whole repository.
- Export it to the controlled records system at each release, in a format that will still be readable without the platform. Plain text, structured data files, and PDF renderings of the approvals.
- Assign a retention period consistent with the records the analytics support, and a disposition process.
- Cover deletion risk. An organization-level repository deletion, an expired platform contract, or an account closure can remove the entire history. Backup and restoration have to be procedural, tested, and owned.
The question that exposes this gap in an audit: “Show me the exact transformation logic that produced the figure in the 2027 product quality review.” If the only answer is “we can check the repository,” ask what happens when the platform contract ends, when the vendor is replaced, or when the repository is archived during a reorganization. If nobody can answer, the endurance attribute is not satisfied and it will be found.
Gap five: version control tracks code, not data
The repository proves what the logic was. It does not prove which rows went through it. Two runs of identical code against a source table that changed underneath produce different outputs, and only one of them may match the number in the report. Reproducibility of a regulated output needs the code version, the source data state, and the run record joined together. In practice that means recording, for every production build of an in-scope model, the commit hash, the run timestamps, the source freshness state, the row counts, and the test results, and keeping that run record with the same retention as the output it supports. This is the piece teams most often assume the tool handles for them.
Scoping GxP: Classify Models by What They Feed
The fastest way to make an analytics platform ungovernable is to declare the whole warehouse GxP. Nobody can carry formal qualification across 600 models, so the policy is quietly ignored and the organization ends up with no real control anywhere. The alternative is not to declare the whole warehouse out of scope. It is to classify.
The classification question is not what a model contains. It is what a model feeds. A model holding batch data that only ever lands in an exploratory notebook carries different risk from a model holding the same data that feeds a product quality review. Intended use drives the assurance effort, which is the same logic CSA applies to production and quality system software and the same logic GAMP 5 applies through risk assessment.114
A three-tier scheme that holds up
Regulated decision or record
Output is used to make or support a GxP decision, or becomes part of a regulated record. Batch disposition inputs, product quality review figures, stability trending, deviation and CAPA metrics reported to management review, submission or inspection extracts, safety and complaint reporting. Full qualification, QA review of every change, formal release approval.
Regulated monitoring, indirect
Output triggers attention but a qualified person makes the decision from the source system. Operational quality dashboards, signal detection views, environmental monitoring trend screens. Peer review, automated tests required, documented requirements, lighter formal qualification with a rationale for the reduced rigor.
Business and exploratory
Commercial analytics, forecasting, headcount, site operations, research exploration. Engineering standards apply because they produce good work, but no GxP qualification, no QA review, no formal release record.
The contamination rule
A Tier A model may not depend on a model classified lower than Tier A, and may not depend on an unclassified model. Either promote the upstream model or the classification is wrong. This single rule prevents the most common scoping failure, which is a qualified model quietly built on an ungoverned one.
Marking and enforcing the boundary inside the project
A classification that lives in a separate spreadsheet will drift within a quarter. The classification has to live next to the code and the build has to enforce it. In a dbt project the mechanics are ordinary:
- Declare the tier as model metadata. Every model carries a required key in its configuration, for example a
gxp_tiervalue undermeta, alongside a named system owner and the intended use in one sentence. Tags let the same models be selected as a group at build time.21 - Fail the build when a model is unclassified. A continuous integration step parses the project manifest and rejects any model without a tier. Unclassified is not a neutral state, it is a defect. This is the check that keeps the scheme alive.
- Enforce the contamination rule mechanically. The same step walks the dependency graph and fails when a Tier A model has an upstream neighbor at a lower tier.
- Declare downstream consumers as exposures. dbt exposures let the project name the dashboards, extracts, and applications that consume a model, which turns “what does this feed” from tribal knowledge into a queryable part of the project.18 This is what makes the classification defensible rather than asserted.
- Put schema shape under contract for Tier A. Model contracts cause a build to fail when the returned columns, types, or constraints do not match what was declared, which prevents a silent shape change from reaching a regulated consumer.17
- Route review by path. Code ownership rules require a quality reviewer on changes touching Tier A directories, so the approval requirement is enforced by the platform rather than remembered by the author.
What good looks like: a reviewer asks which models are in GxP scope and the answer is a query against the project metadata that returns a current list, with the intended use and the named owner for each, and a build that has been failing on unclassified models since the control was introduced. Not a spreadsheet last updated eleven months ago.
The tiering also solves a political problem. Data teams resist GxP scope because they expect it to slow everything down. When the scheme puts most of the warehouse in Tier C and applies real rigor to a defined minority, the conversation changes from resistance to negotiation about which models belong where. That is a much more productive argument to be having.
Tests Are Not Qualification
This is the point where technically strong teams most often mislead themselves, and it is worth being precise. A passing test suite and a qualification are different things, and the difference is not rigor. It is purpose.
Three kinds of automated check, doing three different jobs
Modern transformation frameworks give at least three distinct mechanisms, and conflating them muddles the evidence.
- Data tests run after a model is built and assess the condition of the data that came out. Uniqueness, non-null, accepted values, referential relationships, and custom assertions.15 They answer “is today’s data acceptable.” They are a monitoring control, not a proof of logic.
- Unit tests validate transformation logic against small static inputs before the model is materialized, and dbt Labs recommends running them in development and continuous integration rather than in production because the inputs never change.16 They answer “does the logic do what we specified.” That is much closer to what qualification needs.
- Contracts enforce the declared shape of the output at build time and stop the model building when it does not conform.17 They answer “is the interface still what consumers were promised.”
A team that only writes data tests has good data monitoring and no evidence about its logic. A team that only writes unit tests has evidence about logic and no monitoring of production data condition. For a Tier A model, a reviewer should expect all three, and should expect the team to be able to say which question each one answers.
What qualification adds
Qualification demonstrates fitness for intended use. That requires several things a test suite does not provide on its own.
| A green pipeline gives you | Qualification also requires |
|---|---|
| Tests ran and passed | A statement of the requirement each test satisfies, with a traceable identifier, so coverage can be assessed rather than assumed |
| Assertions defined by the author | Expected results defined and approved before execution, so the test is not written to match the behavior that already exists |
| A pass or fail signal | A reviewed result: someone competent looked at what was tested and judged the coverage adequate for the intended use |
| Execution against whatever was in the branch | Execution against the specific release candidate in the qualified environment, with the commit identifier recorded |
| Tests that pass | Evidence that the tests can fail. A negative test run, or a mutation of the logic showing the suite catches it |
| Test data as configured | A rationale for the test data: why these cases, which boundary conditions, which known-difficult records |
| An alert when something breaks | A defined response when a test fails in production: who is notified, whether the output is quarantined, when a deviation is raised |
The negative testing point deserves emphasis
A suite that has never failed is not reassuring, it is unexamined. For Tier A models, deliberately introduce a defect in a controlled branch and confirm the suite catches it. Record that exercise. It is the single cheapest piece of evidence that turns “we have tests” into “our tests work,” and reviewers respond to it because it is the question they were already going to ask.
Where the requirement lives
Requirements do not need to live in a separate document, and they usually should not, because a separate document drifts. They can live in the repository as structured files with stable identifiers, reviewed through the same process as the code. What matters is that a requirement has an identifier, that tests reference it, and that a traceability view can be generated on demand showing which requirements are covered and by what. Generated traceability is more reliable than a hand-maintained matrix, because it cannot silently fall out of date. It is also the artifact that most impresses an auditor who arrived expecting to be handed a stale spreadsheet.
Environments, Data, and the Promotion Path
Separation of development, test, and production is one of the oldest expectations in computerized system compliance and one of the most frequently misdemonstrated. In an analytics platform the separation is often real but poorly evidenced, because it is implemented through naming conventions that a reviewer cannot verify.
Demonstrating separation, not just asserting it
Separation has to be enforced by credentials and configuration, not by discipline. In a dbt project, environments are defined by the connection and target the project runs against, and a deployment environment is configured separately from the development environment.19 The evidence a reviewer should be able to see is:
- Distinct credentials per environment, with the production service account usable only by the orchestration platform and not by individual developers. If a developer’s personal credentials can write to the production schema, there is no separation regardless of what the diagram says.
- Distinct storage targets, meaning different databases or projects rather than different schema prefixes in the same database. Prefix separation fails the first time someone mistypes a target.
- Production deployment from a tagged release, not from a branch tip. This is what makes the production state identifiable. “Production runs the code at the tip of main” is not a version. “Production runs tag v14.2, commit abc1234” is.
- Access review evidence showing who currently holds production write access, reviewed on a defined cycle. Identity and access management is one of the areas the Annex 11 revision draft expands on.7
Production data in lower environments
This is the question that comes up in every one of these programs and it rarely gets a clean answer. Developers want realistic data because synthetic data hides the problems that matter. Quality wants to know why regulated data is sitting in an environment with no controls on it.
Both positions are reasonable. The resolution is to stop treating it as a single question. It splits into three, and each has a different answer.
Logic development needs no production data at all
Unit tests run against small static inputs written into the project. That is their design and it is why they are the right tool for logic verification. A developer building a complex derivation can work entirely from fixtures that represent the cases the requirement describes, including edge cases that do not yet exist in production.
Integration checks need realistic shape, not real records
Confirming that a model runs at scale, joins correctly, and does not blow up on nulls needs data with production characteristics. It does not need production identifiers. A masked or de-identified subset, refreshed on a schedule and governed as a controlled dataset, covers this without putting patient or batch identifiers into a development environment.
Pre-release verification reads production and writes elsewhere
For a Tier A change, the meaningful check is whether the new logic produces the expected result against real current data. Run the release candidate with read access to production sources and write to an isolated verification schema, then compare against the current production output and review the differences. Production data is never modified, and the comparison is the evidence.
Whichever combination is chosen, the decision needs to be written down with its rationale, because “we copy production into dev” discovered during an inspection without a documented basis is a finding, while the same practice with a documented risk assessment and access controls usually is not.
The promotion path and who approves a release
The promotion path is where change control and continuous integration have to be reconciled. Continuous integration in dbt typically builds only the modified models and their downstream dependents into a temporary schema when a pull request is opened, so the change is verified before it merges.20 That is the mechanism. The governance sits around it.
| Step | What happens | Evidence produced |
|---|---|---|
| Change initiated | Branch created from main, referencing a QMS change record for Tier A changes | Branch name and pull request linked to the change record identifier |
| Automated verification | CI builds modified models and downstream dependents into a temporary schema, runs unit tests, data tests, contract enforcement, and the scope checks | CI run log with commit hash, duration, and per-test results |
| Peer review | A second competent person reviews the diff. Quality reviews Tier A changes, enforced by code ownership rules | Approval recorded against the pull request with reviewer identity and time |
| Merge | Merge to the protected main branch. Force push and deletion blocked | Server-side merge event with time and actor |
| Release candidate | A tag is created. The manifest for that tag is captured | Immutable tag, project manifest, dependency versions |
| Qualification run | Tier A test suite executes against the tag in the qualified environment. Results reviewed | Test results tied to the tag, reviewed and approved |
| Release approval | System owner approves. Quality approves for Tier A | Signed approval referencing the tag and the qualification results |
| Deployment | Production job runs the tagged version. Deployment is a configuration change, not a code change | Deployment record naming the previous and new tags |
Two details in that sequence do most of the work. Deploying from a tag rather than from a branch means the thing that was approved is exactly the thing that runs, which is the entire point of a release. And keeping the QMS change record even though the pull request already documents the change means the quality system retains a coherent index of changes across all systems, not just the ones that happen to live in a repository. The pull request is the technical record. The change record is the quality record. They reference each other and neither replaces the other.
On emergency changes: every organization needs a path for a broken production model on a Friday afternoon, and pretending otherwise just means the path exists undocumented. Define it: same repository, same branch protection, reduced review requirement with a named approver, and a mandatory retrospective review within a defined window. An emergency path that is written down and used a few times a year is a control. An emergency path that is not written down is a habit.
Rewriting the Validation Deliverables
Quality organizations think in deliverables, and the fastest way to unblock a program is to show which traditional deliverable each piece of the code-based approach satisfies, and which ones still have to be written as documents. Some do.
| Traditional deliverable | Code-based equivalent | Still needed as a document? |
|---|---|---|
| Validation plan | None. This describes the approach, the scope, and the roles | Yes. Written once for the platform, updated on material change |
| User requirements | Requirement files in the repository with stable identifiers, reviewed through pull request | No, if identifiers are stable and traceability can be generated |
| Functional and design specification | The model code, the declared contracts, generated documentation, and the dependency graph | No, for Tier A a short design note explaining non-obvious logic is worth writing |
| Installation qualification | Environment definition as configuration, plus a captured record of deployed package and platform versions | No, provided the record is retained per release |
| Operational qualification | Unit tests, data tests, and contract checks executed against the release candidate, traced to requirements | No, provided results are reviewed and retained, not just green |
| Performance qualification | Business user verification of outputs against independently derived expected values | Yes, in the sense that someone has to record the review and its conclusion |
| Traceability matrix | Generated from requirement identifiers referenced in test metadata | No. Generated is better than maintained |
| Change control | Pull request with review and approval | Yes, as a QMS record that references the pull request |
| Periodic review | Repository health report: unclassified models, failing or skipped tests, bypass events, access review | Yes, as a conclusion and signature on the generated report |
| Validation summary report | None | Yes. A human has to state that the system is fit for its intended use |
The pattern in that table is consistent. The specifications and the test evidence move into the repository and get better in the process. The judgments stay as documents, because a judgment is a person taking responsibility and no pipeline does that.
What about the framework itself
One question comes up in every review and has a settled answer. The transformation framework is infrastructure or a standard software product depending on how it is deployed, and it is not custom application code. Under GAMP 5 categorization, the framework and the warehouse are supplier-provided components qualified through supplier assessment and infrastructure qualification, while the models an organization writes are the configured or custom layer that carries the qualification effort.14 Nobody is being asked to validate the query compiler. They are being asked to validate what their team wrote with it, which is a much smaller and more sensible task. Supplier assessment of the platform vendor still applies, and the Annex 11 revision draft puts more weight on supplier oversight than the current text does.7
Secure development practices belong in the same conversation
Because the transformation layer is now software, the practices that apply to software apply here: dependency management, secrets handling, review requirements, and build integrity. NIST’s Secure Software Development Framework provides a recognized structure for those practices that most IT organizations already reference for other systems.26 Aligning the analytics repository with the same standard avoids inventing a parallel set of controls and makes the security review shorter.
A Practical Sequence for Getting There
Most organizations are not starting from nothing. There is usually an existing analytics platform, a data team already working in a repository, and a quality organization that has not yet been asked about it. The sequence that works starts with scope rather than with controls, because controls applied before scope get applied to everything and then abandoned.
Inventory what the outputs actually feed
Not the models. The outputs. Walk the dashboards, extracts, and reports and ask who uses each one and for what decision. Most organizations discover two things: fewer outputs feed regulated decisions than the quality team feared, and at least one output feeds a regulated decision that nobody in the data team knew about. Declare the consumers as exposures so this stops being a one-time exercise.
Classify every model and make unclassified a build failure
Apply the tier scheme, record it as model metadata with a named owner and a one-sentence intended use, and add the CI check that rejects unclassified models and lower-tier upstream dependencies. Expect this to take a few weeks and to surface genuine disagreements about what counts as a regulated decision. Those disagreements are the valuable output.
Close the three repository gaps
Branch protection on the production branch blocking force push and deletion with restricted bypass, signed commits required on protected branches with signing identities tied to named individuals, and a release export that lands the tag, the manifest, the test results, and the approval in the controlled records system with a retention period attached. These three changes take days, not months, and they convert the strongest part of the argument from an assertion into a control.
Write requirements for Tier A models and trace the tests
Only Tier A. Short structured requirement files with stable identifiers, referenced from test metadata, with a generated traceability view. Where a requirement has no test, either write the test or record why one is not needed. Where a test has no requirement, decide whether it is a data monitoring control rather than a qualification test and label it accordingly.
Make the promotion path real and prove the tests can fail
Tagged releases, deployment from tags, qualification run against the tag, documented release approval by the system owner and quality for Tier A. Then run the negative test exercise and record it. This is the step that converts a technically sound pipeline into something a reviewer will accept.
Set up periodic review and let the scheme breathe
A quarterly generated report covering unclassified models, tests that are failing or have been skipped, protection bypass events, access review, and models whose tier should change because their consumers changed. Signed by the system owner. The tier of a model is not permanent, and the review is where reclassification happens deliberately rather than by accident.
Two mistakes worth avoiding
Do not start by writing a validation plan for the platform. Scope first. A plan written before the inventory will define scope wrongly and everything downstream inherits the error.
Do not let the quality organization write the controls alone, and do not let the data team write them alone either. Controls written only by quality will be unenforceable in a pipeline. Controls written only by engineers will satisfy nobody in an inspection. The scheme that survives is drafted jointly and enforced in the build.
This is not really about dbt
dbt is the example because it is what most teams are using, but nothing in the argument depends on it. The same reasoning applies to any framework where transformations are code in a repository: SQL-based frameworks, orchestrated processing jobs, statistical programs in clinical development, or a warehouse-native transformation service. What matters is that the logic is expressed as reviewable text, that changes go through a controlled path, that the tests are meaningful and can be shown to fail, that scope is asserted and enforced, and that the record outlives the tool. Every one of those is a property of the practice, not the product. An organization that gets those right can change frameworks without redoing its validation approach, which is itself a good argument for building the approach around the practice rather than around the vendor.
Conclusion
The collision between analytics engineering and validation culture is mostly a collision of formats, not of substance. A transformation layer under version control, with review before merge, tests that run on every build, and deployment from tagged releases, produces a stronger and more complete change record than the document-and-screenshot process it replaces, and that record maps cleanly onto ALCOA+ and onto the risk-based direction that FDA, EMA, and PIC/S have all been moving toward. The organizations that struggle are usually not struggling with a regulatory obstacle. They are struggling because nobody has translated what the pipeline already produces into the language the quality system uses.
The parts that are genuinely hard are narrow and worth naming plainly. Repository history is immutable by convention rather than by construction, so branch protection and signed commits become controls with owners rather than developer preferences. A repository is not a records archive, so releases have to be exported and retained on a defined period. And scope has to be asserted deliberately and enforced in the build, because a warehouse has no natural boundary and an unclassified model is a defect rather than a neutral state. Close those three and the rest of the approach stands on evidence that is better than what most validated reporting systems can produce today.
Sakara Digital works with pharma and biotech organizations building analytics platforms that have to satisfy both an engineering team and a quality organization. If you are moving your transformation layer into code and want an independent perspective on how to scope it, what to control, and what evidence to keep, we are happy to have that conversation.
For Further Reading
For Further Reading
- Data Lineage in Regulated Industries: From Source to Submission
- FDA Computer Software Assurance (CSA): A Practical Guide to Risk-Based Validation
- Data Integrity and ALCOA+ in the Digital Age: Modernizing Compliance for Cloud and AI Systems
- Data Contracts in Pharma: Why Producers and Consumers Need Written Agreements
- Data Lakehouse Architecture for Pharma: Unifying Clinical, Manufacturing, and Commercial Data
- Annex 11 and Annex 22 Revisions: Preparing GxP Systems for EMA’s New AI and Data Integrity Rules
References & Sources
- U.S. Food and Drug Administration. “Computer Software Assurance for Production and Quality Management System Software.” Guidance for Industry and FDA Staff, September 2025. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/computer-software-assurance-production-and-quality-management-system-software
- U.S. Food and Drug Administration. “Computer Software Assurance for Production and Quality Management System Software” (full guidance text, PDF), 2025. https://www.fda.gov/media/188844/download
- Federal Register. “Computer Software Assurance for Production and Quality System Software; Guidance for Industry and Food and Drug Administration Staff; Availability.” 24 September 2025. https://www.federalregister.gov/documents/2025/09/24/2025-18468/computer-software-assurance-for-production-and-quality-system-software-guidance-for-industry-and
- Medicines and Healthcare products Regulatory Agency. “‘GXP’ Data Integrity Guidance and Definitions,” Revision 1, March 2018. https://assets.publishing.service.gov.uk/media/5aa2b9ede5274a3e391e37f3/MHRA_GxP_data_integrity_guide_March_edited_Final.pdf
- Pharmaceutical Inspection Co-operation Scheme. “Good Practices for Data Management and Integrity in Regulated GMP/GDP Environments,” PI 041-1, 1 July 2021. https://picscheme.org/docview/4234
- European Commission. “EudraLex Volume 4, Annex 11: Computerised Systems,” January 2011. https://health.ec.europa.eu/system/files/2016-11/annex11_01-2011_en_0.pdf
- European Commission. “Annex 11: Computerised Systems” (draft for public consultation), July 2025. https://health.ec.europa.eu/document/download/40231f18-e564-4043-94de-c031f813d38b_en
- European Medicines Agency. “Concept Paper on the Revision of Annex 11 of the Guidelines on Good Manufacturing Practice for Medicinal Products: Computerised Systems.” https://www.ema.europa.eu/en/documents/regulatory-procedural-guideline/concept-paper-revision-annex-11-guidelines-good-manufacturing-practice-medicinal-products-computerised-systems_en.pdf
- Electronic Code of Federal Regulations. “21 CFR Part 11: Electronic Records; Electronic Signatures.” https://www.ecfr.gov/current/title-21/chapter-I/subchapter-A/part-11
- Electronic Code of Federal Regulations. “21 CFR 211.180: Records and Reports, General Requirements.” https://www.ecfr.gov/current/title-21/section-211.180
- U.S. Food and Drug Administration. “Data Integrity and Compliance With Drug CGMP: Questions and Answers.” Guidance for Industry, December 2018. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/data-integrity-and-compliance-drug-cgmp-questions-and-answers
- U.S. Food and Drug Administration. “Electronic Systems, Electronic Records, and Electronic Signatures in Clinical Investigations: Questions and Answers.” Guidance for Industry, October 2024. https://www.fda.gov/regulatory-information/search-fda-guidance-documents/electronic-systems-electronic-records-and-electronic-signatures-clinical-investigations-questions
- International Council for Harmonisation. “ICH Harmonised Guideline E6(R3): Good Clinical Practice,” Step 4 version, 6 January 2025. https://database.ich.org/sites/default/files/ICH_E6(R3)_Step4_FinalGuideline_2025_0106.pdf
- International Society for Pharmaceutical Engineering. “GAMP 5 Guide, 2nd Edition: A Risk-Based Approach to Compliant GxP Computerized Systems,” 2022. https://ispe.org/publications/guidance-documents/gamp-5-guide-2nd-edition
- dbt Labs. “Add data tests to your DAG.” dbt Developer Hub documentation. https://docs.getdbt.com/docs/build/data-tests
- dbt Labs. “Unit tests.” dbt Developer Hub documentation. https://docs.getdbt.com/docs/build/unit-tests
- dbt Labs. “Model contracts.” dbt Developer Hub documentation. https://docs.getdbt.com/docs/mesh/govern/model-contracts
- dbt Labs. “Add Exposures to your DAG.” dbt Developer Hub documentation. https://docs.getdbt.com/docs/build/exposures
- dbt Labs. “About dbt environments.” dbt Developer Hub documentation. https://docs.getdbt.com/docs/environments-in-dbt
- dbt Labs. “Continuous integration in dbt.” dbt Developer Hub documentation. https://docs.getdbt.com/docs/deploy/continuous-integration
- dbt Labs. “tags.” dbt Developer Hub resource configuration reference. https://docs.getdbt.com/reference/resource-configs/tags
- GitHub. “About protected branches.” GitHub Docs. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches
- GitHub. “About rulesets.” GitHub Docs. https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets
- Chacon, S. and Straub, B. “Git Tools: Rewriting History.” Pro Git, 2nd Edition. https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
- Git. “git-commit Documentation” (commit signing options). https://git-scm.com/docs/git-commit
- National Institute of Standards and Technology. “SP 800-218: Secure Software Development Framework (SSDF) Version 1.1.” https://csrc.nist.gov/pubs/sp/800/218/final








Your perspective matters—join the conversation.