Skip to content

dbt

The dbt connector uses the dbt manifest.json file as input. The connector can either retrieve the manifest.json file by providing a URL to a published file, like a dbt Docs URL (recommended), or by uploading a manifest.json file manually (use for testing or if the manifest.json file is not available through a URL). When fetching the manifest.json file from an URL, the axios library is used.

The dbt connector is a secondary connector and can therefore be combined with other connectors to blend metadata from multiple sources, or used stand-alone.

The dbt connector currently support import of the following metadata:

  • schema (such as tables, columns, datatypes etc)
  • descriptions
  • lineage
  • code / technical definition (both raw dbt code and compiled SQL)

It does (not yet) support import of this metadata:

  • tags
  • meta
  • owner
  • relationships
  • exposures

The default manifest.json filename can be configured in the Settings -> Connectors -> dbt section. The filename specified there is the filename the connector looks for when a URL without specified filename is provided, like “www.url.to/dbt_docs”.

Every model, seed, snapshot and source in the manifest becomes a dataset, placed by the three names dbt already gives it: database, schema and the relation name.

bmog datasource (database)
├── landing dataset group (schema)
│ └── salesmaster_restaurant dataset (source)
│ ├── restaurant_id field (column)
│ └── restaurant_name field (column)
└── gold dataset group (schema)
└── dim_restaurant dataset (model)
Katalogue conceptdbt concept
datasource_namenode database
datasource_type_namemetadata.adapter_type
dataset_group_namenode schema
dataset_name (model, seed, snapshot)alias, or name when no alias is set
dataset_name (source)identifier, or name when no identifier is set
dataset_type_namefrom the node’s materialization: view for view and ephemeral, otherwise table. A snapshot is a table. A source is reported as table, because the manifest does not record what the relation is
dataset_descriptionnode description
dataset_technical_definitioncompiled_code (not sources)
dataset_technical_definition_rawraw_code (not sources)
fieldan entry in the node’s columns
datatype_namecolumn data_type, or the matching entry in config.column_types
field_descriptioncolumn description
lineageparent_map

A source becomes a dataset in its own right, with the columns it declares — not only an endpoint for lineage. Where a model and a source resolve to the same database, schema and relation name, the model is kept and the source is skipped.

A manifest does not say whether a source relation is a table or a view, so a source is catalogued as a table. Where a primary connector catalogues the same relation, its type is kept — the dbt connector does not overwrite it.

A snapshot is catalogued as a dataset and takes part in lineage on both sides — the models feeding it and the models selecting from it. dbt materializes a snapshot as a table, so its dataset type is table.

metadata.adapter_type types every datasource the connector creates, sources included. A source is therefore typed as the engine the project runs on, not the engine that holds the relation.

A manifest has one metadata.adapter_type, but its nodes may name more than one database — a model can set its own, which is usual where a project writes across several Snowflake databases, Unity Catalog catalogs or BigQuery projects. One connection can therefore create several datasources, and all of them are typed with that single adapter type.

Each manifest is its own connection. Where two projects name the same database, both resolve to the same datasource, within the System rules below.

A dbt dataset is matched against datasources in the same System as the connection. A relation catalogued under a different System is not matched, and a second datasource is created in the connection’s System instead. Lineage is matched across Systems.

Lineage is matched by name: a dbt node’s database, schema and relation name must equal the datasource, dataset group and dataset that another connector registered for the same object.

For a source, the relation name is identifier when one is declared, and name otherwise. Declare it wherever the relation is not called what dbt calls it — a name containing a space, needing quoting, or case-sensitive:

sources:
- name: salesmaster
database: bmog
schema: sales
tables:
- name: order_details # the name used in dbt
identifier: "Order Details" # the name of the relation itself

A source whose upstream is not a relation cannot be connected this way. identifier names something the project’s adapter can query, so it cannot carry an endpoint path or a file name. Systems imported by the API connector or the File connector reach the warehouse through an ingestion step that dbt does not describe, and the lineage chain begins at the warehouse.

The full manifest is fetched first, then datasource filters are applied within Katalogue before import. See Datasource Filters.