diff --git a/cosmos/config.py b/cosmos/config.py index 77707830c..ccda2c432 100644 --- a/cosmos/config.py +++ b/cosmos/config.py @@ -288,7 +288,7 @@ def validate_profiles_yml(self) -> None: raise CosmosValueError(f"The file {self.profiles_yml_filepath} does not exist.") def get_profile_type(self) -> str: - if self.profile_mapping is not None and hasattr(self.profile_mapping, "dbt_profile_type"): + if isinstance(self.profile_mapping, BaseProfileMapping): return str(self.profile_mapping.dbt_profile_type) profile_path = self._get_profile_path()