efolgar opened a new issue #9541:
URL: https://github.com/apache/airflow/issues/9541


   The GoogleCampaignManagerInsertReportOperator fails with the following 400 
error when attempting to insert a report rendered from a file template:
   
   > HttpError 400 when requesting 
https://www.googleapis.com/dfareporting/v3.3/userprofiles/*******/reports?alt=json
 returned "Report type needs to be set."
   
   Appears the issue is that Jinja templates will always render as a String but 
the operator is expecting a Dictionary (representing the JSON object).
   
   Here's a sample call:
   ```
   GoogleCampaignManagerInsertReportOperator(
           task_id="create_report",
           gcp_conn_id=self.config.get("gcp_connection_id"),
           profile_id=self.config.get("cm_profile_id"),
           report="./resources/reports/cm_report.json",
           params=report_params,
           dag=self.dag)
   ```
   
   Relevant Code:
   
https://github.com/apache/airflow/blob/096f5c5cba963b364ee75f6686d128cd4d34d66e/airflow/providers/google/marketing_platform/operators/campaign_manager.py#L287


----------------------------------------------------------------
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.

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


Reply via email to