Skip to content

Commit

Permalink
Merge pull request #27 from Dorianteffo/dev_dorian
Browse files Browse the repository at this point in the history
remove executable path cosmos
  • Loading branch information
Dorianteffo committed Mar 21, 2024
2 parents 0451b9f + 66a7181 commit a00d55c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 35 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/cd_airflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ jobs:
SCRIPT_AFTER: |
cd airflow
echo -e "AIRFLOW_UID=$(id -u)\nAIRFLOW_GID=0" > .env
sudo apt install python3-pip
pip3 install virtualenv
virtualenv dbt_venv
source myenv/bin/activate
pip install dbt-snowflake
deactivate
docker build -t apache-airflow:dbt-snowflake-dorian .
docker compose up airflow-init
docker compose up -d
Expand Down
4 changes: 3 additions & 1 deletion airflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM apache/airflow:2.8.3
# FROM apache/airflow:2.8.3

FROM apache/airflow:2.8.3-python3.10

COPY requirements.txt /

Expand Down
6 changes: 3 additions & 3 deletions airflow/dags/cosmos_dbt_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from airflow.decorators import dag

DBT_PROJECT_PATH = "/opt/airflow/dags/dbt/dbt_transformation"
DBT_EXECUTABLE_PATH = "/opt/airflow/dbt_venv/Lib/site-packages"
# DBT_EXECUTABLE_PATH = "/opt/airflow/dbt_venv/bin/dbt"

profile_config_dev = ProfileConfig(
profile_name="modern_warehouse",
Expand Down Expand Up @@ -38,7 +38,7 @@ def dbt_dag():
group_id = "dbt_dev",
project_config=ProjectConfig(DBT_PROJECT_PATH),
operator_args={"install_deps": True},
execution_config = ExecutionConfig(dbt_executable_path = DBT_EXECUTABLE_PATH),
# execution_config = ExecutionConfig(dbt_executable_path = DBT_EXECUTABLE_PATH),
profile_config=profile_config_dev,
default_args={"retries": 2}
)
Expand All @@ -48,7 +48,7 @@ def dbt_dag():
group_id = "dbt_prod",
project_config=ProjectConfig(DBT_PROJECT_PATH),
operator_args={"install_deps": True},
execution_config = ExecutionConfig(dbt_executable_path = DBT_EXECUTABLE_PATH),
# execution_config = ExecutionConfig(dbt_executable_path = DBT_EXECUTABLE_PATH),
profile_config=profile_config_prod,
default_args={"retries": 2}
)
Expand Down
25 changes: 0 additions & 25 deletions airflow/dags/dbt/dbt_transformation/profiles.yml

This file was deleted.

0 comments on commit a00d55c

Please sign in to comment.