Skip to content

Commit 3bc44a9

Browse files
Merge pull request #292 from cityofaustin/charlie/maximo-refactor-status-history
Maximo reporting DAG refactor + work order status history
2 parents 1b12304 + a6d42a0 commit 3bc44a9

1 file changed

Lines changed: 27 additions & 3 deletions

File tree

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
}
6767

6868
with DAG(
69-
dag_id=f"dts_maximo_reporting_workorders",
69+
dag_id=f"dts_maximo_reporting",
7070
description="Uploads the last 7 days of Maximo work orders to Socrata from the Maximo data warehouse.",
7171
default_args=DEFAULT_ARGS,
7272
schedule_interval="00 6 * * *" if DEPLOYMENT_ENVIRONMENT == "production" else None,
@@ -82,11 +82,35 @@
8282
image=docker_image,
8383
docker_conn_id="docker_default",
8484
auto_remove="force",
85-
command=f"python etl/work_orders_to_socrata.py",
85+
command=f"python etl/maximo_to_socrata.py --query work_orders",
8686
environment=env_vars,
8787
tty=True,
8888
force_pull=True,
8989
mount_tmp_dir=False,
9090
)
9191

92-
t1
92+
t2 = DockerOperator(
93+
task_id="maximo_service_requests_to_socrata",
94+
image=docker_image,
95+
docker_conn_id="docker_default",
96+
auto_remove="force",
97+
command=f"python etl/maximo_to_socrata.py --query service_requests",
98+
environment=env_vars,
99+
tty=True,
100+
force_pull=False,
101+
mount_tmp_dir=False,
102+
)
103+
104+
t3 = DockerOperator(
105+
task_id="maximo_work_order_history_to_socrata",
106+
image=docker_image,
107+
docker_conn_id="docker_default",
108+
auto_remove="force",
109+
command=f"python etl/maximo_to_socrata.py --query work_order_status_history",
110+
environment=env_vars,
111+
tty=True,
112+
force_pull=False,
113+
mount_tmp_dir=False,
114+
)
115+
116+
t1 >> t2 >> t3

0 commit comments

Comments
 (0)