Skip to content

Dataset

dbt project and run artifact datasets for AI training

A dbt dataset is a business's dbt project: the SQL models that turn raw warehouse tables into reporting tables, the YAML that describes and tests each column, its macros, seeds and snapshots, the Git history of all of it, and the manifest.json, catalog.json and run_results.json artifacts where runs were archived. SourceX sources it to a buyer's spec from established businesses that run dbt on their warehouse. Each dataset is de-identified, with seeds and credentials screened, and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
A dbt project repository with Git history: models, sources, tests, macros, seeds, snapshots and exposures, plus archived run artifacts
Typical systems
dbt Core run from a scheduler, or jobs on the dbt platform (formerly dbt Cloud), on the Snowflake, BigQuery, Databricks, Redshift or Postgres adapters
Typical history
Git history from the project's first commit; run artifacts only as far back as the business or the dbt platform archived them
Modality
Jinja-templated SQL and YAML, with JSON artifacts carrying compiled SQL, lineage, timings and test outcomes
Delivery formats
Git bundle or repository archive, artifacts as JSON per invocation, and JSONL of nodes with raw and compiled code
Preparation
Seeds, fixtures and stored test failures screened for real data; profiles and credentials removed; installed packages kept apart
Licensing
Scoped to the project and, if agreed, the warehouse tables it reads and builds; dbt Labs' terms and package licenses checked by owner and buyer
Availability
Sourced to your spec; artifact archives and warehouse rows depend on what the business kept, and supply is not guaranteed
CodeIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
unique_idstringThe node's key in manifest.json, which starts with its resource type and package name, as in model.harbor_analytics.fct_order_revenue.
resource_typeenummodel, seed, snapshot, test, unit_test, source, macro, exposure, semantic_model or metric, as the manifest labels it.
package_namestringThe project's own name, or an installed package such as dbt_utils, which separates the business's code from third-party code.
original_file_pathstringPath of the .sql, .yml or .csv file under models, seeds, snapshots, tests or macros.
raw_codestringThe file as written: a SELECT with Jinja, ref, source and config calls and macro invocations.
compiled_codestringThe SQL after Jinja was rendered for one target, with real relation names; present only for compiled nodes, and named compiled_sql (beside raw_sql) by older dbt versions.
configobjectThe node's resolved config: materialized as view, table, incremental or ephemeral, unique_key, incremental_strategy, schema and tags.
depends_onobjectNode and macro IDs resolved from ref and source calls, the same edges as the manifest's parent_map and child_map.
columnsarrayColumn names and descriptions from the YAML properties file, joined to the data types catalog.json recorded from the warehouse.
data_testsarrayTests attached to the node: unique, not_null, accepted_values and relationships with their arguments, singular tests and severity.
run_resultobjectThe node's run_results.json entry: status such as success, error, skipped, pass, fail or warn, execution_time, message, failures and adapter_response.rows_affected.
invocationobjectrun_results.json metadata and args: invocation_id, generated_at, dbt version, command, selection and target.
commit_historyarrayGit commits that touched the file: hash, date, replaced author key, message and diff.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "unique_id": "model.harbor_analytics.fct_order_revenue",
  "resource_type": "model",
  "package_name": "harbor_analytics",
  "original_file_path": "models/marts/finance/fct_order_revenue.sql",
  "raw_code": "{{ config(materialized='incremental', unique_key='order_id') }}\nselect o.order_id, o.ordered_at, sum(p.amount) as revenue\nfrom {{ ref('stg_orders') }} o\njoin {{ ref('stg_payments') }} p using (order_id)\n{% if is_incremental() %}where o.ordered_at > (select max(ordered_at) from {{ this }}){% endif %}\ngroup by 1, 2",
  "compiled_code": "select o.order_id, o.ordered_at, sum(p.amount) as revenue\nfrom analytics.staging.stg_orders o\njoin analytics.staging.stg_payments p using (order_id)\nwhere o.ordered_at > (select max(ordered_at) from analytics.marts.fct_order_revenue)\ngroup by 1, 2",
  "config": {
    "materialized": "incremental",
    "unique_key": "order_id",
    "schema": "marts"
  },
  "depends_on": {
    "nodes": [
      "model.harbor_analytics.stg_orders",
      "model.harbor_analytics.stg_payments"
    ],
    "macros": [
      "macro.dbt.is_incremental"
    ]
  },
  "columns": [
    {
      "name": "revenue",
      "description": "Sum of captured payments, refunds excluded.",
      "catalog_type": "NUMBER"
    }
  ],
  "data_tests": [
    {
      "name": "unique",
      "column_name": "order_id"
    },
    {
      "name": "relationships",
      "column_name": "order_id",
      "kwargs": {
        "to": "ref('stg_orders')",
        "field": "order_id"
      }
    }
  ],
  "run_result": {
    "status": "error",
    "execution_time": 4.82,
    "message": "Database Error: column p.amount does not exist"
  },
  "invocation": {
    "invocation_id": "6c1e0f4a-9b2d-4e7a-8a51-3f0c2d7b9e10",
    "command": "build",
    "target": "prod",
    "generated_at": "2025-03-04T02:15:09Z"
  },
  "commit_history": [
    {
      "commit": "9f2c1ab",
      "authored_at": "2025-03-04T09:41:00Z",
      "author": "user_0c7d",
      "message": "payments source renamed amount to amount_cents"
    }
  ]
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Train SQL generation with stated inputs

Each model is a SELECT whose inputs are named by ref and source, so a task comes with its upstream tables.

Learn to document and test models

Models paired with their column descriptions and data tests teach a model to write the YAML for new SQL.

Predict downstream impact of a change

A commit's diff plus the child_map and the next run's test outcomes show what a change broke.

Diagnose failed runs

run_results error messages paired with the commit that fixed them are worked examples of repair.

Evaluate analytics engineering agents

Adding a mart or refactoring a staging model can be graded by the project's own tests.

Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets

What makes this data valuable

Full Git history

The repository arrives with every commit, not a snapshot of the main branch.

Artifacts per invocation

More than the last run survives, with each file tied to an invocation_id and a commit.

Compiled SQL present

The manifest came from a compile, run or build, so compiled_code is filled in.

Packages pinned

packages.yml and the lock file state the versions, so the project parses as it did in production.

Tests with outcomes

Data tests come with pass, fail and warn results over time, not only their definitions.

Warehouse scope stated

The delivery says which source and model tables are included as rows, if any.

Process

Dbt dataset

This page covers dbt project code and run artifacts.Illustrative

One SELECT per model makes the project a dependency graph

A dbt SQL model is one SELECT statement in one .sql file, and by default the file name becomes the name of the table or view. A model names another model with a ref call and a raw table with a source call, and dbt parses those calls to build the graph and decide run order. Lineage is therefore declared in the code, from raw tables through staging models to marts, not inferred from query logs. The CREATE and MERGE statements are not in the repository. dbt generates them at run time from each model's materialization: view, table, incremental or ephemeral.

Beside the SQL sit YAML properties files with a description for each model and column and the data tests attached to them: unique, not_null, accepted_values and relationships, plus singular tests written as queries. These are the business's stated assumptions about its data, and a relationships test stands in for a foreign key the warehouse does not enforce. Exposures name the dashboards a model feeds. Coverage is uneven: many projects document their marts and leave staging models bare.

Git keeps every version of the code, but nothing in dbt keeps the data. A table model is rebuilt from scratch on each run. An incremental model only adds or merges new rows, so its older rows were produced by earlier versions of the SQL unless someone ran a full refresh. Snapshots are the one construct that keeps row history, as type 2 records with columns named dbt_valid_from and dbt_valid_to by default, and they live in the warehouse and capture only the state at each snapshot run. And because of Jinja the file is a template: with is_incremental branches and target conditions, the SQL that ran depends on the environment.

dbt holds no data, and its artifacts describe one invocation

What comes out of dbt is code plus the artifacts in the project's target directory. manifest.json lists every model, test, seed, snapshot, source, macro and exposure with its config, raw code and dependencies, and holds compiled SQL only for nodes that were compiled, so a manifest written by a parse has none. run_results.json holds, for one invocation, each node's status, timing, message and failure count. catalog.json is written only when docs are generated and carries column types as the warehouse reported them. The target directory is listed in the starter project's .gitignore and each invocation overwrites the files, so a test command run after a build replaces the build's results.

Run history therefore exists only where someone archived it. The dbt platform, dbt Labs' hosted service formerly called dbt Cloud, saves artifacts per job run and serves them through its APIs, for a period the buyer should ask about. Teams on dbt Core often upload only the latest production manifest for state comparison in CI, or use a community package that writes each run's results into warehouse tables. Artifacts hold no rows: a failed test is a count, unless store_failures saved the failing rows to a warehouse table named after the test, which is real data and is replaced on the next test run. Macros from installed packages resolve only with the pinned versions, and that code belongs to its authors under its own license.

Three checks fall to the buyer. Seeds are CSV files committed to Git, and beside country codes they can hold customer lists or employee mappings, which stay in history after deletion. profiles.yml normally lives outside the project, but some teams commit it with passwords in it. And the license must say whether it covers the warehouse tables the models read and build, or the code alone. To test a sample, parse the project with a placeholder profile, compare node counts with the delivered manifest, and trace one mart back to its sources.

What to check before licensing

  • Ask whether the license covers only the repository and artifacts or also the warehouse tables the models read and build.
  • Search the whole Git history, not only the head commit, for seed CSVs and test fixtures that hold real customer or employee values.
  • Check every commit for profiles.yml, .env files, key files and connection strings, and ask whether any exposed credential was rotated.
  • Ask where artifacts were archived, on the dbt platform, in object storage or in warehouse tables, and how many invocations of which commands they cover.
  • Read the manifest metadata for the dbt version and adapter type, confirm compiled_code is filled in, and ask whether store_failures tables exist.
  • Separate installed packages from the business's own nodes by package_name, and check each package's license.
  • Have the data owner and your counsel check dbt Labs' terms for the dbt platform and its APIs against the intended use.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

Does a dbt dataset include the data in the warehouse?

No, not by itself. dbt stores no rows: the project is code, and its artifacts hold SQL, lineage, timings and test counts. The tables that models read and build sit in Snowflake, BigQuery or another warehouse and are a separate scope. If you want inputs and outputs beside the SQL, ask for those tables in the same request.

How much run history can we expect?

Often only the last invocation, unless the business archived more. run_results.json is overwritten each time dbt runs. Longer history comes from the dbt platform's stored job artifacts, from files uploaded to object storage by a scheduler, or from a package that writes results into warehouse tables. Ask which of these exists and what dates it covers.

What is the difference between raw and compiled SQL?

Raw code is the file as the analyst wrote it, with Jinja, ref and source calls and macros. Compiled code is what dbt rendered for one target, with real relation names and each macro expanded into one adapter's dialect. Raw code shows intent and dependencies, compiled code shows what ran.

Can we rebuild the tables from the project?

Only with the source tables, the same adapter and the pinned packages. Even then, incremental models may not match, because their older rows were built by earlier versions of the SQL, and snapshot tables cannot be rebuilt at all, since they record what dbt saw at each past run. Ask for those tables as data if you need them.

Can a dbt project contain personal data?

Yes, in a few known places. Seed CSV files, unit test fixtures and literal values in singular tests or WHERE clauses can hold real names, emails or account numbers, and Git history keeps them after deletion. These are screened and replaced before delivery, and the method is recorded. No method is perfect, so search the sample's history too.

Is SourceX affiliated with dbt Labs?

dbt is named to identify the system the records come from. That does not imply a partnership with or endorsement by dbt Labs. The records belong to the business that runs dbt, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 26 November 2026.

See if your company qualifies