Skip to content

Commit

Permalink
add BaseAdapter.MAX_SCHEMA_METADATA_RELATIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Mar 12, 2024
1 parent 2a99e36 commit f6527ad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ class BaseAdapter(metaclass=AdapterMeta):
ConstraintType.foreign_key: ConstraintSupport.ENFORCED,
}

MAX_SCHEMA_METADATA_RELATIONS = 100

# This static member variable can be overriden in concrete adapter
# implementations to indicate adapter support for optional capabilities.
_capabilities = CapabilityDict({})
Expand Down Expand Up @@ -1151,7 +1153,7 @@ def get_filtered_catalog(
catalogs: agate.Table
if (
relations is None
or len(relations) > 100
or len(relations) > MAX_SCHEMA_METADATA_RELATIONS
or not self.supports(Capability.SchemaMetadataByRelations)
):
# Do it the traditional way. We get the full catalog.
Expand Down

0 comments on commit f6527ad

Please sign in to comment.