Skip to main content

DBT

Status: experimental

The DBT plugin ingests metadata from dbt (Data Build Tool) projects, including models, sources, seeds, and lineage relationships. It reads dbt's generated artifacts to understand your data transformation layer and how it connects to your warehouse.

Prerequisites

Generate dbt Artifacts

Before Marmot can ingest your dbt project, you need to generate the artifact files. These are created in your project's target/ directory.

Required: Run dbt compile or dbt build to generate manifest.json:

dbt compile
# or
dbt build

Recommended: Run dbt docs generate to create catalog.json with column types and statistics:

dbt docs generate

Artifact Files

FileRequiredGenerated ByContains
manifest.jsonYesdbt compile, dbt build, dbt runModels, sources, seeds, lineage, SQL
catalog.jsonNodbt docs generateColumn types, table stats, owner info

Example Configuration


target_path: "/path/to/dbt/project/target"
project_name: "analytics"
environment: "production"
tags:
- "dbt"
- "analytics"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
discover_modelsboolfalseDiscover DBT models
discover_sourcesboolfalseDiscover DBT sources
discover_testsboolfalseDiscover DBT tests
environmentstringfalseEnvironment name (e.g., production, staging)
external_links[]ExternalLinkfalseExternal links to show on all assets
include_catalogboolfalseInclude catalog.json for table/column descriptions
include_manifestboolfalseInclude manifest.json for model definitions
include_run_resultsboolfalseInclude run_results.json for test results
include_sources_jsonboolfalseInclude sources.json for source definitions
model_filterplugin.FilterfalseFilter configuration for models
project_namestringfalseDBT project name
tagsTagsConfigfalseTags to apply to discovered assets
target_pathstringfalsePath to DBT target directory containing manifest.json, catalog.json, etc.

Available Metadata

The following metadata fields are available:

FieldTypeDescription
adapter_typestringDatabase adapter type (postgres, snowflake, bigquery, etc)
aliasstringTable alias if different from model name
catalog_commentstringComment from database catalog
column_commentstringColumn comment from database catalog
column_descriptionstringColumn description from DBT
column_namestringColumn name
column_tags[]stringTags applied to this column
config_enabledboolWhether model is enabled
config_full_refreshboolWhether to perform full refresh
config_materializedstringMaterialization strategy from config
config_on_schema_changestringBehavior when schema changes (append_new_columns, fail, ignore)
config_persist_docsboolWhether to persist documentation to database
config_tagsstringTags from config
data_typestringColumn data type
databasestringSource database name
databasestringTarget database name
databasestringTarget database name
dbt_materializedstringMaterialization type (table, view, incremental, ephemeral)
dbt_original_pathstringOriginal path in the DBT project
dbt_packagestringDBT package name
dbt_packagestringDBT package name
dbt_packagestringDBT package name
dbt_pathstringPath to the model file
dbt_unique_idstringDBT's unique identifier for this source
dbt_unique_idstringDBT's unique identifier for this node
dbt_unique_idstringDBT's unique identifier for this seed
dbt_versionstringDBT version used to generate this model
environmentstringDeployment environment (dev, prod, etc)
environmentstringDeployment environment
environmentstringDeployment environment
freshness_checkedboolWhether freshness checks are configured
fully_qualified_namestringFully qualified name (database.schema.table)
fully_qualified_namestringFully qualified name (database.schema.table)
fully_qualified_namestringFully qualified name (database.schema.table)
identifierstringPhysical table identifier
last_run_execution_timefloat64Execution time of last run in seconds
last_run_failuresintNumber of failures in last run
last_run_messagestringMessage from last DBT run
last_run_statusstringStatus of the last DBT run (success, error, skipped)
loadedboolWhether source was loaded at time of DBT execution
model_namestringDBT model name
ownerstringTable/view owner from database catalog
project_namestringDBT project name
project_namestringDBT project name
project_namestringDBT project name
raw_sqlstringRaw SQL before compilation
schemastringSource schema name
schemastringTarget schema name
schemastringTarget schema name
seed_pathstringPath to seed CSV file
source_namestringDBT source name
stat_approximate_countint64Approximate row count
stat_bytesint64Size in bytes
stat_last_modifiedstringLast modification timestamp
stat_num_rowsint64Number of rows (alternative)
stat_row_countint64Number of rows
stat_sizefloat64Table size
table_namestringPhysical table/view name in database
table_namestringSource table name
table_namestringSeed table name