Skip to main content

dbt Information Schema tables

The dbt Information Schema is a contracted interface into the metadata for all of the resources in your dbt project. Information Schema tables are produced by dbt build, dbt run, dbt compile, or dbt parse with the --generate-info-schema flag.

Tables

The dbt Information Schema v1 generates tables across these namespaces:

  • dbt: Contains metadata about your project's structure, resources, and configuration. Answers the question: What is your project?
  • dbt_rt: Contains runtime execution data. Answers the question: What happened when you ran your project?

dbt namespace

The dbt namespace tables contain metadata about your project's structure, resources, and configuration.

TableDescription
dbt.dag_nodesAll DAG participants with unique_id and resource_type
dbt.projectProject-level metadata
dbt.packagesInstalled packages, one row per package
dbt.project_varsProject variables, one row per (project scope, variable name)
dbt.project_env_varsEnvironment variables used in the project
dbt.modelsAll models
dbt.seedsAll seeds
dbt.sourcesAll sources
dbt.snapshotsAll snapshots
dbt.functionsAll user-defined functions
dbt.analysesAll analyses
dbt.hooksAll on-run-start and on-run-end hook operations
dbt.checksAll checks
dbt.data_testsAll data tests (generic and singular)
dbt.unit_testsAll unit tests
dbt.macrosAll macros
dbt.groupsAll groups
dbt.exposuresAll exposures
dbt.metricsAll metrics
dbt.docs_blocksAll docs blocks
dbt.saved_queriesAll saved queries
dbt.semantic_modelsAll semantic models
dbt.semantic_entitiesSemantic model entities
dbt.semantic_measuresSemantic model measures
dbt.semantic_dimensionsSemantic model dimensions
dbt.semantic_relationshipsRelationships between semantic models
dbt.time_spinesTime spine definitions
dbt.classifiersResource classifiers
dbt.edgesDAG edges (parent → child)
dbt.node_columnsColumn names, types, and descriptions for all nodes
dbt.column_lineageColumn-level lineage (populated with --static-analysis strict)

dbt_rt namespace

The dbt_rt namespace tables contain runtime execution data. These tables are not available for parse-time checks.

TableDescription
dbt_rt.invocationsOne row per dbt invocation
dbt_rt.run_resultsResults for each node in each invocation
dbt_rt.run_results_latestView of the most recent run result per node
dbt_rt.relationsWarehouse catalog data for each materialized relation (populated with --write-catalog)
dbt_rt.freshnessFreshness check results for sources and models; resource_type indicates whether a row is a source or model
dbt_rt.diagnosticsDiagnostic data from invocations
dbt_rt.adapter_queriesAdapter queries issued during invocations

Columns available for checks

When you use {{ info_schema() }} macro in a check, you can access only columns resolved at parse time. dbt exposes these columns through a view with the same name as the Information Schema table. Pass that name without the dbt. prefix to the macro.

The full table in target/info_schema/v1/ may have more columns. You can access all columns when you use the macro with dbt show --inline.

ViewColumns
modelsunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, ingested_at
seedsunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, ingested_at
snapshotsunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, raw_code, ingested_at
functionsunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, raw_code, ingested_at
analysesunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, raw_code, ingested_at
hooksunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, raw_code, ingested_at
checksunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, raw_code, ingested_at
sourcesunique_id, name, resource_type, package_name, original_file_path, fqn, alias, description, node_language, database_name, schema_name, relation_name, identifier, enabled, materialized, config, access, group, contract_enforced, version, latest_version, deprecation_date, primary_key, properties_yml_file_path, tags, meta, source_name, source_description, loader, loaded_at_field, ingested_at
data_testsunique_id, name, package_name, original_file_path, fqn, description, database_name, schema_name, relation_name, enabled, materialized, config, tags, meta, group, properties_yml_file_path, test_name, test_definition_package, arguments, column_name, node_unique_id, severity, warn_if, error_if, fail_calc, store_failures, store_failures_as, ingested_at
unit_testsunique_id, name, model, description, package_name, original_file_path, fqn, given, expect, overrides, versions, ingested_at
node_columnsnode_unique_id, column_name, data_type_declared, description, tags, ingested_at
dag_nodesunique_id, resource_type, ingested_at — one row per enabled resource that participates in the DAG, including exposures, metrics, and unit tests
edgesparent_unique_id, child_unique_id, ingested_at
macrosunique_id, name, package_name, original_file_path, macro_sql, description, depends_on_macros, arguments, docs_show, properties_yml_file_path, meta, created_at, ingested_at
docs_blocksunique_id, name, package_name, original_file_path, content, ingested_at
groupsunique_id, name, description, owner_name, owner_email, ingested_at
exposuresunique_id, name, exposure_type, label, owner_name, owner_email, url, maturity, description, package_name, original_file_path, fqn, depends_on, tags, created_at, ingested_at
metricsunique_id, name, label, metric_type, description, package_name, original_file_path, fqn, type_params, metric_filter, time_granularity, input_metric_names, group, tags, meta, config, created_at, ingested_at
saved_queriesunique_id, name, label, description, package_name, original_file_path, fqn, query_params, exports, depends_on, group, tags, created_at, ingested_at
semantic_modelsunique_id, name, model, label, description, fqn, node_relation, primary_entity, defaults, group, created_at, ingested_at
semantic_entitiesunique_id, name, entity_type, description, label, entity_role, expr, ingested_at
semantic_measuresunique_id, name, agg, description, label, expr, create_metric, agg_time_dimension, agg_params, non_additive_dimension, ingested_at
semantic_dimensionsunique_id, name, dimension_type, description, label, expr, is_partition, time_granularity, validity_params, ingested_at
time_spinesunique_id, primary_column, primary_granularity, custom_granularities, node_relation, ingested_at
projectproject_name, dbt_version, adapter_type, git_sha, git_branch, git_uncommitted_changes, ingested_at
packagespackage_name, ingested_at
project_varsproject_name, var_name, var_value, ingested_at — a package-scoped var appears on that package's project_name
project_env_varsenv_var_name, ingested_at

Was this page helpful?

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

0
Loading