Skip to content

Commit

Permalink
Update dags new operator (#199)
Browse files Browse the repository at this point in the history
* update dag operator
* set temp env vars until dbt-coves is fixed

---------

Co-authored-by: Noel Gomez <[email protected]>
  • Loading branch information
noel and Noel Gomez committed Feb 7, 2024
1 parent 23bce86 commit 6ab5f70
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pull_request_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ jobs:
# cannot be applied when using the Datacoves permifrost security model.
DATACOVES__DROP_DB_ON_FAIL: ${{ vars.DATACOVES__DROP_DB_ON_FAIL }}


# this is only here temporarilly until we updtae dbt-coves
DATACOVES__AIRFLOW_DAGS_YML_PATH: ''
DATACOVES__AIRFLOW_DAGS_PATH: ''
DATACOVES__AIRBYTE_HOST_NAME: ''
DATACOVES__AIRBYTE_PORT: ''

steps:
- name: Checkout branch
uses: actions/[email protected]
Expand Down
1 change: 1 addition & 0 deletions orchestrate/dags/daily_loan_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def extract_and_load_fivetran():
tg_extract_and_load_fivetran = extract_and_load_fivetran()
extract_and_load_dlt = DatacovesBashOperator(
task_id="extract_and_load_dlt",
activate_venv=True,
tooltip="dlt Extract and Load",
bash_command="python load/dlt/csv_to_snowflake/load_csv_data.py",
)
Expand Down
7 changes: 5 additions & 2 deletions orchestrate/dags/datacoves_sample_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ def datacoves_sample_dag():
dbt_task = DatacovesDbtOperator(
task_id = "run_dbt_task",
bash_command = "dbt debug",
doc_md = """\
#### Task Documentation
This task leveraged the DatacovesDbtOperator
"""
)

# This is calling an external Python file after activating the venv
# use this instead of the Python Operator
python_task = DatacovesBashOperator(
task_id = "run_python_script",
# Virtual Environment is automatically activated
# activate_venv=True,
activate_venv=True,
bash_command = "python orchestrate/python_scripts/sample_script.py"
)

Expand Down
3 changes: 1 addition & 2 deletions orchestrate/dags_yml_definitions/daily_loan_run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ nodes:
extract_and_load_dlt:
type: task
operator: operators.datacoves.bash.DatacovesBashOperator
# activate_venv: true
# Virtual Environment is automatically activated
activate_venv: true

tooltip: "dlt Extract and Load"
bash_command: "python load/dlt/csv_to_snowflake/load_csv_data.py"
Expand Down

0 comments on commit 6ab5f70

Please sign in to comment.