Skip to content

Commit

Permalink
check configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyK90 committed Jan 11, 2024
1 parent 7ad191c commit a4bf9f7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cosmos/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,16 @@ def validate_dbt_config_vars(self) -> None:

vars_checks: dict[str, dict[str, Any]] = {
"send_anonymous_usage_stats": {"var_type": bool},
"use_colors": {"var_type": bool},
"partial_parse": {"var_type": bool},
"use_experimental_parser": {"var_type": bool},
"static_parser": {"var_type": bool},
"printer_width": {"var_type": int},
"write_json": {"var_type": bool},
"warn_error": {"var_type": str},
"warn_error_options": {"var_type": dict, "accepted_values": {"include", "exclude"}},
"log_format": {"var_type": str, "accepted_values": {"text", "json", "default"}},
"debug": {"var_type": bool},
"version_check": {"var_type": bool},
"fail_fast": {"var_type": bool},
"use_experimental_parser": {"var_type": bool},
"static_parser": {"var_type": bool},
}

if self.dbt_config_vars:
Expand All @@ -265,7 +264,7 @@ def validate_dbt_config_vars(self) -> None:

for var_key, var_value in self.dbt_config_vars.items():
if var_key not in list(vars_checks):
warnings.warn(f"dbt config var {var_key}: {var_value} is not supported")
CosmosValueError(f"dbt config var {var_key}: {var_value} is not supported")
continue

vars_check = vars_checks.get(var_key, {})
Expand Down

0 comments on commit a4bf9f7

Please sign in to comment.