in dags/operational_monitoring_backfill.py [0:0]
def operational_monitoring_backfill_dag():
@task
def generate_backfill_arguments(**context):
cmd = [
"backfill",
"--slug",
context["params"]["slug"],
"--start-date",
context["params"]["start_date"],
"--end_date",
context["params"]["end_date"],
]
if args := context["params"]["args"]:
cmd.append(args)
return cmd
# Built from repo https://github.com/mozilla/opmon
opmon_image = "gcr.io/moz-fx-data-experiments/opmon:latest"
GKEPodOperator(
task_id="opmon_backfill",
name="opmon_backfill",
image=opmon_image,
arguments=generate_backfill_arguments(),
)