FISTA Solutions does not load Google Analytics until you accept. Rejecting keeps optional analytics off. Read the Cookie Policy.

All field notes

Playbook · 5 minute read

How to Build a dbt AI Assistant

A dbt AI assistant grounds in the project's manifest, catalogue, and lineage graph to understand models, columns, and dependencies, generates new models and tests that follow the project's conventions, drafts documentation from column semantics, performs impact analysis from lineage, and delivers every change as a pull request through the normal review flow. The manifest is what makes it accurate.

By FISTA Solutions· AI-Native Engineering Team·
How to Build a dbt AI Assistant article cover

dbt projects are unusually well suited to AI assistance because they are structured: the manifest describes every model and its dependencies, the catalogue describes every column, the lineage graph is explicit, and conventions are encoded in configuration. An assistant that reads those artifacts understands the project far better than one reading SQL files, and it can generate models, tests, and documentation that fit. This guide covers building one that analytics engineers keep using, drawing on FISTA Solutions' AI enablement delivery on data platforms. It complements ai for data teams and how to build a documentation agent.

What does the assistant ground in?

ArtifactProvidesUse
ManifestModels, sources, tests, dependencies, configsStructure and lineage
CatalogueColumns, types, row counts from the warehouseColumn-level grounding
Existing docsDescriptions and meaningSemantics for generation
Project configConventions, materialisations, macrosGenerating within the rules
Run resultsTest outcomes, timingWhat is failing and slow
ExposuresDownstream dashboards and consumersImpact analysis endpoints

Reading these rather than parsing SQL files is what makes the assistant reliable: the manifest already resolved every reference, and the catalogue already knows every column.

What should it do first?

Test generation. Most dbt projects are under-tested, and proposing tests is high value with almost no risk. From column semantics and lineage, the assistant proposes uniqueness and not-null tests on keys, accepted-value tests on status columns, relationship tests along foreign keys the lineage implies, and freshness tests on sources.

A wrong proposed test fails in CI and is discarded; it cannot corrupt data. That risk profile makes it the right place to build the analytics team's trust before the assistant generates models.

How are models generated consistently?

By reading conventions first. Projects have naming patterns, layer structures such as staging and intermediate and marts, materialisation choices per layer, standard macros, and column ordering habits. The assistant infers these from existing models and configuration and generates within them.

A generated model that ignores the conventions is rejected in review, and repeated rejection ends adoption. Conformance is therefore a correctness requirement. Where conventions are inconsistent across the project, which is common, the assistant should ask which pattern to follow rather than picking one.

How does impact analysis work?

By traversing lineage. For any proposed change, the assistant walks the dependency graph downstream to every model, test, and exposure that would be affected and reports it: this change to a staging model feeds these fourteen marts, these six tests, and these two dashboards.

That report accompanies every proposal, and it is frequently the most valuable output, because it prevents the change that looked local and broke a board dashboard. Column-level lineage, where the project supports it, makes the analysis precise enough to say which downstream columns actually depend on the changed one.

How should documentation be generated?

Drafted from column semantics and lineage, reviewed for meaning. The assistant can infer that a column named with a common pattern is a foreign key to a particular model, that a timestamp is an event time, or that a status column takes the values its accepted-value test lists. It cannot know that a revenue column excludes returns unless something tells it.

Generated descriptions should be marked as drafts and reviewed by someone who knows the data, because a plausible wrong description is worse than none: it will be read and trusted by every downstream consumer, including other AI systems grounding in the catalogue.

How are changes delivered?

As pull requests, always. The assistant produces a branch containing the generated SQL, tests, documentation, and the impact analysis, and opens a pull request for an analytics engineer to review. CI runs the project's tests. The engineer merges or requests changes.

The assistant never writes to the main branch, never runs against production directly, and never bypasses review. That is what keeps the normal discipline intact and what makes it acceptable to security and data governance. See how to adopt ai coding agents safely.

What about SQL quality and warehouse cost?

Generated SQL should be reviewed for the things that cost money: unnecessary full scans, missing partition filters, cartesian joins from an ambiguous grain, and materialisations that rebuild large tables when incremental would do. The assistant can check its own output against these patterns and flag them, and the impact analysis should include the run cost of affected models where run results record it.

How does it integrate with the development flow?

Through the tools engineers already use: the IDE, the version control system, and the CI pipeline. An assistant that requires a separate interface is used less than one available where the work happens. Common integration points are a chat interface in the IDE grounded in the current project, a command that generates tests for the model being edited, and a bot that comments impact analysis on every pull request.

How is it evaluated?

Test proposals by acceptance rate and by the share that fail once run, which indicates a wrong inference. Model generation by review outcome and by the number of review cycles before merge. Documentation by reviewer edits. Impact analysis by whether it caught the downstream effects reviewers would have found. Track adoption directly: whether engineers use it week over week.

What does the build sequence look like?

One week on manifest and catalogue grounding and the lineage traversal. One week on test generation with the analytics team validating proposals. One week on impact analysis as a pull request comment. Two weeks on convention-aware model generation. Then documentation drafting, which is fast once the grounding exists.

What goes wrong?

Parsing SQL files instead of reading the manifest. Generated models that ignore conventions. Documentation merged unreviewed. Direct writes to main. Impact analysis omitted, so a change breaks a dashboard. And assistants delivered as a separate tool that engineers forget to open.

How FISTA Solutions helps

FISTA Solutions builds dbt assistants grounded in the manifest, catalogue, and lineage, starting with test generation, producing convention-conformant models with impact analysis, and delivering everything as reviewed pull requests, through AI enablement, AI agents, and forward deployed engineers working with analytics engineering teams. The record behind the approach is 150+ projects for 50+ companies with 99.9% uptime.

To give analytics engineers an assistant that understands the project, message FISTA on WhatsApp, or read ai for data teams.

Share-ready article cover

Download the generated social format.

Download cover

Clear answers

Questions raised by this field note.

Straightforward guidance for evaluating scope, fit, and the next step.

01What does the assistant ground in?

The manifest, which lists every model, source, test, and their dependencies; the catalogue, which holds column names and types from the warehouse; and the existing documentation and conventions. Together they let the assistant understand the project structurally rather than by reading SQL files individually.

02Which task should the assistant do first?

Test generation: proposing uniqueness, not-null, accepted-value, and relationship tests for models that lack them, based on column semantics and lineage. It is high value because most projects are under-tested, and low risk because a proposed test that is wrong fails visibly in CI rather than corrupting data.

03How are generated models kept consistent with the project?

By reading the project's conventions from existing models and configuration: naming patterns, layer structure such as staging and marts, materialisation choices, and macro usage, and generating within them. A model that ignores the conventions is rejected in review, which wastes the effort.

04How does impact analysis work?

By traversing the lineage graph from a proposed change to every downstream model, exposure, and test, and reporting what would be affected, so a change to a staging model that feeds forty marts and a board dashboard is understood before it is made.

05How should changes be delivered?

As pull requests with the generated SQL, tests, and documentation, plus the impact analysis, for an analytics engineer to review, run in CI, and merge. The assistant never commits to the main branch, which keeps the normal review discipline intact.

Start with the hard problem

Need the outcome owned, not merely analyzed?

Tell us where delivery is constrained. We’ll map the fastest credible path from intent to verified production.

Start a project