apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
37.27k stars 14.34k forks source link

Update the Search Ads 360 hook to Call the New Reporting API #39942

Closed Taishan314 closed 3 hours ago

Taishan314 commented 5 months ago

Description

The current Search Ads 360 API is being deprecated and replaced with the Search Ads Reporting API, details of which are found here.

I currently use the GoogleSearchAds operators which all call the GoogleSearchAdsHook, which in turn, establishes a connection to an api as seen here.

I believe this is calling the api soon to be deprecated. The deprecation date supplied by google is the 30th June 2024.

Use case/motivation

I'd like to see an update to this method to call the new api, perhaps make the old one optional for deprecation purposes.

The old api service name is: doubleclicksearch.googleapis.com The new api service name is: searchads360.googleapis.com

I believe the change should be adding the string "searchads360" to the build() method inside the get_conn() method call.

Making that parameter configurable with the default as "doubleclicksearch" would be the ideal change for deprecation of the old api.

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

Taragolis commented 5 months ago

cc @VladaZakharova

molcay commented 5 months ago

@Taishan314 thank you for creating the issue. This will be implemented and included for one of the upcoming versions for the google providers

Taishan314 commented 5 months ago

@molcay Thank you very much! Do you know if the version will be released before the 30th June?

Taishan314 commented 5 months ago

FYI, I dived into the code for the replacement api and the change I suggested won't be enough for this update.

Legacy API: https://googleapis.github.io/google-api-python-client/docs/dyn/doubleclicksearch_v2.html Replacement API: https://googleapis.github.io/google-api-python-client/docs/dyn/searchads360_v0.html

appley commented 2 days ago

Hi! I am interested in working on this!

molcay commented 1 day ago

Hi @appley,

Thank you for your interest, we really appreciate it.

However, we already have the related operators in the Google Provider. The first release for the related operators was v10.23.0. Also here is the documentation for this: https://airflow.apache.org/docs/apache-airflow-providers-google/10.23.0/operators/marketing_platform/search_ads.html

Hi @Taishan314, I somehow missed the following comment, sorry for that.

@molcay Thank you very much! Do you know if the version will be released before the 30th June?

The change was released 24th September, 2024. Here is the PR that includes this implementation: #42255

We forget to close this issue, sorry for the inconvenience.

Hi @Taragolis, can we close this one?