From 4533f1219e450811c55a8944a5908bcfe4ccc0d3 Mon Sep 17 00:00:00 2001 From: Charlie Henry Date: Wed, 31 Jul 2024 10:19:24 -0500 Subject: [PATCH 1/2] remove date_filter_arg --- dags/atd_knack_dms.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dags/atd_knack_dms.py b/dags/atd_knack_dms.py index 919b3cc..bb4ff83 100644 --- a/dags/atd_knack_dms.py +++ b/dags/atd_knack_dms.py @@ -1,3 +1,5 @@ +# test locally with: docker compose run --rm airflow-cli dags test atd_knack_dms + import os from airflow.models import DAG @@ -73,8 +75,6 @@ app_name = "data-tracker" container = "view_1564" - date_filter_arg = get_date_filter_arg(should_replace_monthly=True) - env_vars = get_env_vars_task(REQUIRED_SECRETS) t1 = DockerOperator( @@ -82,7 +82,7 @@ docker_conn_id="docker_default", image=docker_image, auto_remove=True, - command=f"./atd-knack-services/services/records_to_postgrest.py -a {app_name} -c {container} {date_filter_arg}", + command=f"./atd-knack-services/services/records_to_postgrest.py -a {app_name} -c {container}", environment=env_vars, tty=True, force_pull=True, @@ -94,7 +94,7 @@ image=docker_image, docker_conn_id="docker_default", auto_remove=True, - command=f"./atd-knack-services/services/records_to_socrata.py -a {app_name} -c {container} {date_filter_arg}", + command=f"./atd-knack-services/services/records_to_socrata.py -a {app_name} -c {container}", environment=env_vars, tty=True, mount_tmp_dir=False, @@ -105,10 +105,10 @@ image=docker_image, docker_conn_id="docker_default", auto_remove=True, - command=f"./atd-knack-services/services/records_to_agol.py -a {app_name} -c {container} {date_filter_arg}", + command=f"./atd-knack-services/services/records_to_agol.py -a {app_name} -c {container}", environment=env_vars, tty=True, mount_tmp_dir=False, ) - date_filter_arg >> t1 >> t2 >> t3 + t1 >> t2 >> t3 From 78a9d3571eff6d3a3533da143d045df2210c2ff5 Mon Sep 17 00:00:00 2001 From: Charlie Henry Date: Wed, 31 Jul 2024 10:23:27 -0500 Subject: [PATCH 2/2] remove unneeded import --- dags/atd_knack_dms.py | 1 - 1 file changed, 1 deletion(-) diff --git a/dags/atd_knack_dms.py b/dags/atd_knack_dms.py index bb4ff83..8a05bee 100644 --- a/dags/atd_knack_dms.py +++ b/dags/atd_knack_dms.py @@ -7,7 +7,6 @@ from pendulum import datetime, duration from utils.onepassword import get_env_vars_task -from utils.knack import get_date_filter_arg from utils.slack_operator import task_fail_slack_alert DEPLOYMENT_ENVIRONMENT = os.getenv("ENVIRONMENT", "development")