Skip to content

Commit

Permalink
Merge pull request #200 from cityofaustin/14319-sign-specs
Browse files Browse the repository at this point in the history
14319 add socrata step to the sign specifications dag
  • Loading branch information
chiaberry authored Jan 11, 2024
2 parents 63b350e + 7959400 commit 120d36c
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions dags/atd_knack_signs_work_order_specifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,27 @@
"opitem": "ArcGIS Online (AGOL) Scripts Publisher",
"opfield": "production.password",
},
"SOCRATA_API_KEY_ID": {
"opitem": "Socrata Key ID, Secret, and Token",
"opfield": "socrata.apiKeyId",
},
"SOCRATA_API_KEY_SECRET": {
"opitem": "Socrata Key ID, Secret, and Token",
"opfield": "socrata.apiKeySecret",
},
"SOCRATA_APP_TOKEN": {
"opitem": "Socrata Key ID, Secret, and Token",
"opfield": "socrata.appToken",
},
}


with DAG(
dag_id="atd_knack_signs_work_order_specifications",
description="Publish sign work order specifications to Postgres, AGOL",
description="Publish sign work order specifications (view_3106) to Postgres, AGOL",
default_args=DEFAULT_ARGS,
schedule_interval="35 1 * * *" if DEPLOYMENT_ENVIRONMENT == "production" else None,
tags=["repo:atd-knack-services", "knack", "agol", "signs-markings"],
tags=["repo:atd-knack-services", "knack", "agol", "signs-markings", "socrata"],
catchup=False,
) as dag:
docker_image = "atddocker/atd-knack-services:production"
Expand All @@ -68,6 +80,7 @@
t1 = DockerOperator(
task_id="signs_asset_specs_to_postgrest",
image=docker_image,
docker_conn_id="docker_default",
auto_remove=True,
command=f"./atd-knack-services/services/records_to_postgrest.py -a {app_name} -c {container} {date_filter_arg}",
environment=env_vars,
Expand All @@ -79,11 +92,23 @@
t2 = DockerOperator(
task_id="signs_asset_specs_to_agol",
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}",
environment=env_vars,
tty=True,
mount_tmp_dir=False,
)

date_filter_arg >> t1 >> t2
t3 = DockerOperator(
task_id="signs_asset_specs_to_socrata",
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}",
environment=env_vars,
tty=True,
mount_tmp_dir=False,
)

date_filter_arg >> t1 >> t2 >> t3

0 comments on commit 120d36c

Please sign in to comment.