Skip to content

Commit

Permalink
Extend dbt-coves generate docs with PROFILES_DIR (#419)
Browse files Browse the repository at this point in the history
* Extend dbt-coves generate docs with PROFILES_DIR

* Fix generate airflow-dags
  • Loading branch information
BAntonellini authored Nov 24, 2023
1 parent ee93b33 commit 8164a7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbt_coves/tasks/generate/airflow_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def generate_task_group(self, tg_name: str, tg_conf: Dict[str, Any]):
elif isinstance(task_call, dict):
trigger = task_call.pop("trigger")
sensor = task_call.pop("sensor")
task_group_output.append(f"{' ' *8}{trigger['name']}\n")
task_group_output.append(f"{' ' *8}{trigger['call']}\n")
task_group_output.append(f"{' ' *8}{sensor['call']}\n")
task_group_output.append(f"{' ' *8}{trigger['name']} >> {sensor['name']}\n")

Expand Down
5 changes: 4 additions & 1 deletion dbt_coves/tasks/generate/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def get_config_value(self, key):
return self.coves_config.integrated["generate"]["docs"][key]

def _generate_dbt_docs(self):
output = run_and_capture_cwd(["dbt", "docs", "generate"], self.config.project_root)
command = ["dbt", "docs", "generate"]
if self.config.args.PROFILES_DIR:
command.extend(["--profiles-dir", self.config.args.PROFILES_DIR])
output = run_and_capture_cwd(command, self.config.project_root)

if output.returncode == 0:
deps_status = "[green]SUCCESS :heavy_check_mark:[/green]"
Expand Down

0 comments on commit 8164a7f

Please sign in to comment.