o-nikolas commented on a change in pull request #19400:
URL: https://github.com/apache/airflow/pull/19400#discussion_r743229736



##########
File path: 
airflow/providers/google/marketing_platform/example_dags/example_campaign_manager.py
##########
@@ -87,20 +87,21 @@
 with models.DAG(
     "example_campaign_manager",
     schedule_interval='@once',  # Override to match your needs,
-    start_date=dates.days_ago(1),
+    start_date=datetime(2021, 1, 1),
+    catchup=False,
 ) as dag:
     # [START howto_campaign_manager_insert_report_operator]
     create_report = GoogleCampaignManagerInsertReportOperator(
         profile_id=PROFILE_ID, report=REPORT, task_id="create_report"
     )
-    report_id = "{{ task_instance.xcom_pull('create_report')['id'] }}"
+    report_id = create_report.output["report_id"]
     # [END howto_campaign_manager_insert_report_operator]
 
     # [START howto_campaign_manager_run_report_operator]
     run_report = GoogleCampaignManagerRunReportOperator(
         profile_id=PROFILE_ID, report_id=report_id, task_id="run_report"
     )
-    file_id = "{{ task_instance.xcom_pull('run_report')['id'] }}"
+    file_id = run_report.output["file_id"]

Review comment:
       Caught up offline with Josh, and this now makes sense to me :) The 
GoogleCampaignManagerRunReportOperator was also setting another xcom key that 
specifically stored the 'file_id' (which is what he's using now), whereas the 
previous code ignored this key and fetched the id from the full response stored 
in the default return value xcom.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to