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

turbaszek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new ef98edf  Add more information about using GoogleAdsHook (#9951)
ef98edf is described below

commit ef98edf4da2d9b74d5cf5b21e81577b3151edb79
Author: Tomek Urbaszek <[email protected]>
AuthorDate: Thu Jul 23 17:03:42 2020 +0200

    Add more information about using GoogleAdsHook (#9951)
    
    This hook requires two connections and it's not obvious how
    to use it and what is the purpose of each connection.
---
 airflow/providers/google/ads/hooks/ads.py | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/airflow/providers/google/ads/hooks/ads.py 
b/airflow/providers/google/ads/hooks/ads.py
index 32d381a..81f8cf0 100644
--- a/airflow/providers/google/ads/hooks/ads.py
+++ b/airflow/providers/google/ads/hooks/ads.py
@@ -34,7 +34,30 @@ from airflow.hooks.base_hook import BaseHook
 
 class GoogleAdsHook(BaseHook):
     """
-    Hook for the Google Ads API
+    Hook for the Google Ads API.
+
+    This hook requires two connections:
+
+        - gcp_conn_id - provides service account details (like any other GCP 
connection)
+        - google_ads_conn_id - which contains information from Google Ads 
config.yaml file
+          in the ``extras``. Example of the ``extras``:
+
+        .. code-block:: json
+
+            {
+                "google_ads_client": {
+                    "developer_token": "{{ INSERT_TOKEN }}",
+                    "path_to_private_key_file": null,
+                    "delegated_account": "{{ INSERT_DELEGATED_ACCOUNT }}"
+                }
+            }
+
+        The ``path_to_private_key_file`` is resolved by the hook using 
credentials from gcp_conn_id.
+        
https://developers.google.com/google-ads/api/docs/client-libs/python/oauth-service
+
+    .. seealso::
+        For more information on how Google Ads authentication flow works take 
a look at:
+        
https://developers.google.com/google-ads/api/docs/client-libs/python/oauth-service
 
     .. seealso::
         For more information on the Google Ads API, take a look at the API 
docs:

Reply via email to