You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/10/02 15:47:42 UTC

[GitHub] [airflow] efolgar commented on a change in pull request #6228: [AIRFLOW-5379] Add Google Search Ads 360 operators

efolgar commented on a change in pull request #6228: [AIRFLOW-5379] Add Google Search Ads 360 operators
URL: https://github.com/apache/airflow/pull/6228#discussion_r330626901
 
 

 ##########
 File path: airflow/gcp/sensors/search_ads.py
 ##########
 @@ -0,0 +1,76 @@
+# -*- coding: utf-8 -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""
+This module contains Google Search Ads sensor.
+"""
+from typing import Dict, Optional
+
+from airflow.utils.decorators import apply_defaults
+from airflow.sensors.base_sensor_operator import BaseSensorOperator
+from airflow.gcp.hooks.search_ads import GoogleSearchAdsHook
+
+
+class GoogleSearchAdsReportSensor(BaseSensorOperator):
+    """
+    Polls for the status of a report request.
+
+    .. seealso::
+        For API documentation check:
+        https://developers.google.com/search-ads/v2/reference/reports/get
+
+    .. seealso::
+        For more information on how to use this operator, take a look at the guide:
+        :ref:`howto/operator:GoogleSearchAdsReportSensor`
+
+    :param report_id: ID of the report request being polled.
+    :type report_id: str
+    :param api_version: The version of the api that will be requested for example 'v3'.
+    :type api_version: str
+    :param gcp_conn_id: The connection ID to use when fetching connection info.
+    :type gcp_conn_id: str
+    :param delegate_to: The account to impersonate, if any. For this to work, the service accountmaking the
+        request must have  domain-wide delegation enabled.
+    :type delegate_to: str
+    """
+
+    template_fields = ("report_id",)
+
+    @apply_defaults
+    def __init__(
 
 Review comment:
   Can we default the mode to "reschedule" and set the default poke interval to 5 minutes to better support larger reports?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services