dbt-labs/dbt-core · error · IndexError

no information-schema table named

Error message

no information-schema table named '{}'

What it means

The index-core information-schema view builder resolves a named 'vocabulary' (a logical information-schema table like a dbt namespace table) via spec_for(Ns::Dbt, vocabulary). When no spec is registered for the requested name, create_view_sql fails with this error instead of generating SQL. It is a lookup failure against the fixed set of supported information-schema tables.

Solutions

  1. Check the exact spelling of the vocabulary/table name against the supported dbt information-schema list
  2. Upgrade dbt-index-core if the table was added in a newer release
  3. If Src::Own is intended, ensure the node source is configured so the Own path (dag_nodes_sql) is taken
  4. Register a custom spec if the API allows extending vocabularies

Example fix

// before
create_view_sql("dbt_manifest_tables") // not a registered vocabulary
// after
create_view_sql("manifest_nodes") // a name present in the Dbt vocabulary registry
Defensive patterns

Strategy: validation

Validate before calling

let known = ["manifest_nodes", "sources", "exposures"]; // consult registry docs
assert!(known.contains(&vocabulary), "unsupported info-schema table: {vocabulary}");

Try / catch

match create_view_sql(vocabulary) {
    Err(e) if e.message().starts_with("no information-schema table named") => {
        use_default_vocabulary()
    }
    other => other,
}

Prevention

When it happens

Trigger: Requesting a view over a vocabulary name that is not part of the dbt information-schema registry — e.g. a misspelled table name, a table from a different adapter dialect, or a name only defined in a newer version of index-core.

Common situations: Passing a user-supplied table name into the index view API; referencing an information-schema table supported by another backend (e.g. Postgres-specific tables); version skew between a client expecting newer vocabularies and the library build.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07). Data as JSON: /api/errors/5a6d1c3b740715b5. Report an issue: GitHub.

Appendix: source

Thrown at crates/dbt-index-core/src/info_schema/parse_safe.rs:642

            }
        }
    }

    /// The view's `CREATE OR REPLACE VIEW` statement, reading [`BASE_SCHEMA`].
    ///
    /// Errors describe a mistake in [`VIEWS`] rather than anything about the project, and
    /// the tests in this module are what should catch them; they are returned rather than
    /// panicked so a bad entry takes down one check, not the process.
    pub fn create_view_sql(&self) -> Result<String, IndexError> {
        // Assembled rather than projected. `info_schema::build_own` and
        // `epoch_views::own_sql` special-case the same table by name; this is the third
        // place that has to, for the same reason.
        if matches!(self.src, Src::Own) {
            return self.dag_nodes_sql();
        }

        let spec = spec_for(Ns::Dbt, self.vocabulary).ok_or_else(|| {
            self.err(format!(
                "no information-schema table named '{}'",
                self.vocabulary
            ))
        })?;

        let mut selects = Vec::with_capacity(self.cols.len());
        for out in self.cols {
            let col =
                spec.cols.iter().find(|c| c.out == *out).ok_or_else(|| {
                    self.err(format!("'{out}' is not a column of '{}'", spec.name))
                })?;
            // A column the information schema declares but assembles in code has no
            // source name to borrow; the index column is the one that shares its name.
            let src = if col.src.is_empty() { col.out } else { col.src };
            selects.push(format!("{} AS {}", self.qualify(src)?, quote(out)));
        }

        let from = match self.src {

View on GitHub (pinned to 0267ce9170)