Skip to content

Commit

Permalink
Add full_refresh as templated field
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro committed Oct 1, 2024
1 parent 1195955 commit 2bdd9bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cosmos/operators/airflow_async.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Any
from typing import Any, Sequence

from airflow.providers.google.cloud.hooks.bigquery import BigQueryHook
from airflow.providers.google.cloud.operators.bigquery import BigQueryInsertJobOperator
Expand Down Expand Up @@ -44,6 +44,9 @@ class DbtSourceAirflowAsyncOperator(DbtSourceLocalOperator):


class DbtRunAirflowAsyncOperator(BigQueryInsertJobOperator): # type: ignore

template_fields: Sequence[str] = ("full_refresh",)

def __init__(self, *args, full_refresh: bool = False, **kwargs): # type: ignore
# dbt task param
self.profile_config = kwargs.get("profile_config")
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/execution-modes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Example DAG:

**Known Issue:**

The ```dag test``` command failed with the following error, likely because the trigger does not fully initialize during the ```dag test```, leading to an uninitialized task instance.
The ``dag test`` command failed with the following error, likely because the trigger does not fully initialize during the ``dag test``, leading to an uninitialized task instance.
This causes the BigQuery trigger to attempt accessing parameters of the Task Instance that are not properly initialized.

.. code:: bash
Expand Down

0 comments on commit 2bdd9bb

Please sign in to comment.