Skip to content

Commit

Permalink
behaviour flag
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Oct 22, 2024
1 parent 2687dd3 commit d46d72e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/dbt/context/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,15 @@ def resolve(self, source_name: str, table_name: str):
class SourceQuotingConfig:
quoting: Dict[str, Any] = {"database": False, "schema": False, "identifier": False}

# Preserve legacy behaviour where sources do not consider quoting configuration from dbt_project.yml
base_quoting_config = (
self.config
if self.config.args.source_quoting_respects_project_config
else SourceQuotingConfig()
)

relation = self.Relation.create_from(
SourceQuotingConfig(),
base_quoting_config,
target_source,
limit=self.resolve_limit,
event_time_filter=self.resolve_event_time_filter(target_source),
Expand Down
2 changes: 2 additions & 0 deletions core/dbt/contracts/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ class ProjectFlags(ExtensibleDbtClassMixin):
require_explicit_package_overrides_for_builtin_materializations: bool = True
require_resource_names_without_spaces: bool = False
source_freshness_run_project_hooks: bool = False
source_quoting_respects_project_config: bool = False
skip_nodes_if_on_run_start_fails: bool = False
state_modified_compare_more_unrendered_values: bool = False
state_modified_compare_vars: bool = False
Expand All @@ -351,6 +352,7 @@ def project_only_flags(self) -> Dict[str, Any]:
"require_explicit_package_overrides_for_builtin_materializations": self.require_explicit_package_overrides_for_builtin_materializations,
"require_resource_names_without_spaces": self.require_resource_names_without_spaces,
"source_freshness_run_project_hooks": self.source_freshness_run_project_hooks,
"source_quoting_respects_project_config": self.source_quoting_respects_project_config,
"skip_nodes_if_on_run_start_fails": self.skip_nodes_if_on_run_start_fails,
"state_modified_compare_more_unrendered_values": self.state_modified_compare_more_unrendered_values,
"state_modified_compare_vars": self.state_modified_compare_vars,
Expand Down

0 comments on commit d46d72e

Please sign in to comment.