efolgar commented on a change in pull request #6170: [AIRFLOW-4971][Don't merge] Add Google Display & Video 360 integration URL: https://github.com/apache/airflow/pull/6170#discussion_r330596479
########## File path: airflow/gcp/operators/display_video.py ########## @@ -0,0 +1,301 @@ +# -*- 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 DisplayVideo operators. +""" +import tempfile +import urllib.request +import shutil +from typing import Any, Dict, Optional + + +from airflow.utils.decorators import apply_defaults +from airflow.models.baseoperator import BaseOperator +from airflow.gcp.hooks.display_video import GoogleDisplayVideo360Hook +from airflow.gcp.hooks.gcs import GoogleCloudStorageHook + + +class GoogleDisplayVideo360CreateReportOperator(BaseOperator): + """ + Creates a query. + + .. seealso:: + For more information on how to use this operator, take a look at the guide: + :ref:`howto/operator:GoogleDisplayVideo360CreateReportOperator` + + .. seealso:: + Check also the official API docs: + `https://developers.google.com/bid-manager/v1/queries/createquery` + + :param body: Report object passed to the request's body as described here: + https://developers.google.com/bid-manager/v1/queries#resource + :type body: Dict[str, Any] + :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 = ("body",) Review comment: We should support json as a template extension. ```suggestion template_fields = ("body",) template_ext = (".json",) ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services