Skip to content

Commit

Permalink
Adding emit_datasets param to DbtBaseOperator
Browse files Browse the repository at this point in the history
  • Loading branch information
pgoslatara committed Sep 25, 2023
1 parent d70e6d7 commit bdaf2ef
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cosmos/operators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class DbtBaseOperator(BaseOperator):
(i.e. /home/astro/.pyenv/versions/dbt_venv/bin/dbt)
:param dbt_cmd_flags: List of flags to pass to dbt command
:param dbt_cmd_global_flags: List of dbt global flags to be passed to the dbt command
:param emit_datasets: If enabled model nodes emit Airflow Datasets for downstream cross-DAG dependencies.
Defaults to True
"""

template_fields: Sequence[str] = ("env", "vars")
Expand Down Expand Up @@ -102,6 +104,7 @@ def __init__(
dbt_executable_path: str = get_system_dbt(),
dbt_cmd_flags: list[str] | None = None,
dbt_cmd_global_flags: list[str] | None = None,
emit_datasets: bool = True,
**kwargs: Any,
) -> None:
self.project_dir = project_dir
Expand All @@ -127,6 +130,7 @@ def __init__(
self.dbt_executable_path = dbt_executable_path
self.dbt_cmd_flags = dbt_cmd_flags
self.dbt_cmd_global_flags = dbt_cmd_global_flags or []
self.emit_datasets = emit_datasets
super().__init__(**kwargs)

def get_env(self, context: Context) -> dict[str, str | bytes | os.PathLike[Any]]:
Expand Down

0 comments on commit bdaf2ef

Please sign in to comment.