Skip to content

Commit

Permalink
fix: Ensure a profiles.yml file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasfarias committed Apr 29, 2022
1 parent b37ea17 commit b548439
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions airflow_dbt_python/hooks/dbt.py
Expand Up @@ -389,6 +389,10 @@ def create_dbt_profile(
if self.profiles_dir is not None:
raw_profiles = read_profile(self.profiles_dir)
else:
profiles_path = Path.home() / ".dbt/profiles.yml"
if not profiles_path.exists():
profiles_path.parent.mkdir(exist_ok=True)
profiles_path.touch()
raw_profiles = {}

if extra_targets:
Expand Down

0 comments on commit b548439

Please sign in to comment.