diff --git a/.changes/unreleased/Fixes-20231101-155824.yaml b/.changes/unreleased/Fixes-20231101-155824.yaml new file mode 100644 index 00000000000..dba6679a53e --- /dev/null +++ b/.changes/unreleased/Fixes-20231101-155824.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Make relation filtering None-tolerant for maximal flexibility across adapters. +time: 2023-11-01T15:58:24.552054-04:00 +custom: + Author: peterallenwebb + Issue: "8974" diff --git a/core/dbt/adapters/base/impl.py b/core/dbt/adapters/base/impl.py index e5861cec655..62ac303ca14 100644 --- a/core/dbt/adapters/base/impl.py +++ b/core/dbt/adapters/base/impl.py @@ -1179,9 +1179,12 @@ def get_filtered_catalog( } def in_map(row: agate.Row): - d = _expect_row_value("table_database", row).casefold() - s = _expect_row_value("table_schema", row).casefold() - i = _expect_row_value("table_name", row).casefold() + d = _expect_row_value("table_database", row) + s = _expect_row_value("table_schema", row) + i = _expect_row_value("table_name", row) + d = d.casefold() if d is not None else None + s = s.casefold() if s is not None else None + i = i.casefold() if i is not None else None return (d, s, i) in relation_map catalogs = catalogs.where(in_map)