dbt-labs/dbt-core · error
SerdeDeserializeError
Error message
SerdeDeserializeError: {e} What it means
get_relations_by_pattern tried to deserialize the excluded_schemas Jinja argument into Vec<String> and serde failed: the caller passed a non-list value or a list containing non-string entries, which is rejected before any catalog query runs.
Solutions
- Pass a list of strings for excluded_schemas or omit the argument
- Convert entries to strings before the call (e.g. |map('string'))
- Improve the mapped error to include the offending value
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/dbt-adapter/src/parse/adapter.rs:196 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dbt-labs/dbt-core@0267ce9170 (2026-09-07).
Data as JSON: /api/errors/e967057f3b902b36.
Report an issue: GitHub.
Appendix: source
Thrown at crates/dbt-adapter/src/parse/adapter.rs:196
patterned_dangling_sources,
)
}
#[allow(clippy::too_many_arguments)]
pub fn get_relations_by_pattern(
&self,
state: &State,
schema_pattern: &str,
table_pattern: &str,
_exclude: Option<&str>,
database: Option<&str>,
_quote_table: Option<bool>,
excluded_schemas: Option<Value>,
) -> Result<Value, minijinja::Error> {
// Validate excluded_schemas if provided
if let Some(ref schemas) = excluded_schemas {
let _: Vec<String> = Vec::<String>::deserialize(schemas.clone()).map_err(|e| {
minijinja::Error::new(minijinja::ErrorKind::SerdeDeserializeError, e.to_string())
})?;
}
let target = state
.lookup("target", &[])
.expect("target is set in parse")
.get_attr("database")
.unwrap_or_default();
let default_database = target.as_str().unwrap_or_default();
let database = database.unwrap_or(default_database);
let patterned_relation = RelationPattern::new(
database.to_string(),
schema_pattern.to_string(),
table_pattern.to_string(),
);
if state.is_execute() {View on GitHub (pinned to 0267ce9170)