From 8e268940739154c21aaf40441d91dac806d21a60 Mon Sep 17 00:00:00 2001 From: Erik Farmer <5082725+erik-farmer@users.noreply.github.com> Date: Thu, 26 Oct 2023 03:10:26 -0700 Subject: [PATCH] Update datasets.rst issue with running example code (#35035) dataset list is a list so running `print(dataset, dataset_list, dataset_list[dataset])` causes a `TypeError: list indices must be integers or slices, not str` lastly that attribute name should be `dag_id` and not `dag_run_id` --- docs/apache-airflow/authoring-and-scheduling/datasets.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/apache-airflow/authoring-and-scheduling/datasets.rst b/docs/apache-airflow/authoring-and-scheduling/datasets.rst index 60268bedff4e6..2cc34d9c8870a 100644 --- a/docs/apache-airflow/authoring-and-scheduling/datasets.rst +++ b/docs/apache-airflow/authoring-and-scheduling/datasets.rst @@ -230,8 +230,8 @@ Example: @task def print_triggering_dataset_events(triggering_dataset_events=None): for dataset, dataset_list in triggering_dataset_events.items(): - print(dataset, dataset_list, dataset_list[dataset]) - print(dataset_list[dataset][0].source_dag_run.dag_run_id) + print(dataset, dataset_list) + print(dataset_list[0].source_dag_run.dag_id) print_triggering_dataset_events()