pankajastro commented on code in PR #25587: URL: https://github.com/apache/airflow/pull/25587#discussion_r940510612
########## airflow/providers/google/cloud/operators/dataform.py: ########## @@ -0,0 +1,408 @@ +# 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. + +from typing import TYPE_CHECKING, Dict, Optional, Sequence, Tuple, Union + +from airflow.providers.google.cloud.links.dataform import DataformWorkflowInvocationLink + +if TYPE_CHECKING: + from airflow.utils.context import Context + +from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault +from google.api_core.retry import Retry +from google.cloud.dataform_v1beta1.types import CompilationResult, WorkflowInvocation + +from airflow.models import BaseOperator +from airflow.providers.google.cloud.hooks.dataform import DataformHook + + +class DataformCreateCompilationResultOperator(BaseOperator): + """ + Creates a new CompilationResult in a given project and location. + + :param project_id: Required. The ID of the Google Cloud project that the task belongs to. + :param region: Required. The ID of the Google Cloud region that the task belongs to. + :param repository_id: Required. The ID of the Dataform repository that the task belongs to. + :param compilation_result: Required. The compilation result to create. + :param retry: Designation of what errors, if any, should be retried. + :param timeout: The timeout for this request. + :param metadata: Strings which should be sent along with the request as metadata. + :param gcp_conn_id: The connection ID to use when fetching connection info. + :param delegate_to: The account to impersonate, if any. For this to work, the service accountmaking the + request must have domain-wide delegation enabled. + :param impersonation_chain: Optional service account to impersonate using short-term + credentials, or chained list of accounts required to get the access_token + of the last account in the list, which will be impersonated in the request. + If set as a string, the account must grant the originating account + the Service Account Token Creator IAM role. + If set as a sequence, the identities from the list must grant + Service Account Token Creator IAM role to the directly preceding identity, with first + account from the list granting this role to the originating account (templated). + :param gcp_conn_id: Review Comment: This has been declared twice. Please remove it. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
