This is an automated email from the ASF dual-hosted git repository.

ephraimanierobi pushed a commit to branch v2-7-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit dd67de8d7bf82bbb4290697609d58d44c1ddb9dc
Author: Erik Farmer <5082725+erik-far...@users.noreply.github.com>
AuthorDate: Thu Oct 26 03:10:26 2023 -0700

    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`
    
    (cherry picked from commit 8e268940739154c21aaf40441d91dac806d21a60)
---
 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 60268bedff..2cc34d9c88 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()
 

Reply via email to