apache-airflow-providers-google 10.26.0rc1__py3-none-any.whl → 11.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/google/__init__.py +1 -1
- airflow/providers/google/ads/hooks/ads.py +2 -1
- airflow/providers/google/ads/operators/ads.py +2 -1
- airflow/providers/google/ads/transfers/ads_to_gcs.py +2 -1
- airflow/providers/google/assets/gcs.py +17 -1
- airflow/providers/google/cloud/hooks/automl.py +3 -6
- airflow/providers/google/cloud/hooks/bigquery.py +41 -1486
- airflow/providers/google/cloud/hooks/bigquery_dts.py +4 -11
- airflow/providers/google/cloud/hooks/bigtable.py +3 -6
- airflow/providers/google/cloud/hooks/cloud_batch.py +6 -3
- airflow/providers/google/cloud/hooks/cloud_build.py +3 -15
- airflow/providers/google/cloud/hooks/cloud_composer.py +2 -17
- airflow/providers/google/cloud/hooks/cloud_memorystore.py +5 -6
- airflow/providers/google/cloud/hooks/cloud_run.py +10 -5
- airflow/providers/google/cloud/hooks/cloud_sql.py +5 -7
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +3 -7
- airflow/providers/google/cloud/hooks/compute.py +3 -6
- airflow/providers/google/cloud/hooks/compute_ssh.py +0 -5
- airflow/providers/google/cloud/hooks/datacatalog.py +3 -6
- airflow/providers/google/cloud/hooks/dataflow.py +3 -14
- airflow/providers/google/cloud/hooks/dataform.py +2 -9
- airflow/providers/google/cloud/hooks/datafusion.py +4 -15
- airflow/providers/google/cloud/hooks/dataplex.py +4 -7
- airflow/providers/google/cloud/hooks/dataprep.py +2 -2
- airflow/providers/google/cloud/hooks/dataproc.py +77 -22
- airflow/providers/google/cloud/hooks/dataproc_metastore.py +2 -9
- airflow/providers/google/cloud/hooks/datastore.py +3 -6
- airflow/providers/google/cloud/hooks/dlp.py +3 -6
- airflow/providers/google/cloud/hooks/functions.py +2 -6
- airflow/providers/google/cloud/hooks/gcs.py +2 -18
- airflow/providers/google/cloud/hooks/gdm.py +1 -17
- airflow/providers/google/cloud/hooks/kms.py +3 -6
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +7 -97
- airflow/providers/google/cloud/hooks/life_sciences.py +2 -6
- airflow/providers/google/cloud/hooks/looker.py +2 -1
- airflow/providers/google/cloud/hooks/mlengine.py +0 -8
- airflow/providers/google/cloud/hooks/natural_language.py +3 -6
- airflow/providers/google/cloud/hooks/os_login.py +3 -6
- airflow/providers/google/cloud/hooks/pubsub.py +3 -6
- airflow/providers/google/cloud/hooks/secret_manager.py +3 -73
- airflow/providers/google/cloud/hooks/spanner.py +3 -6
- airflow/providers/google/cloud/hooks/speech_to_text.py +3 -6
- airflow/providers/google/cloud/hooks/stackdriver.py +3 -6
- airflow/providers/google/cloud/hooks/tasks.py +3 -6
- airflow/providers/google/cloud/hooks/text_to_speech.py +3 -6
- airflow/providers/google/cloud/hooks/translate.py +455 -9
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +3 -6
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +3 -6
- airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +3 -6
- airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +2 -9
- airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +2 -9
- airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +1 -14
- airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +3 -6
- airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +2 -9
- airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py +3 -1
- airflow/providers/google/cloud/hooks/vertex_ai/prediction_service.py +2 -1
- airflow/providers/google/cloud/hooks/video_intelligence.py +3 -6
- airflow/providers/google/cloud/hooks/vision.py +3 -6
- airflow/providers/google/cloud/hooks/workflows.py +2 -9
- airflow/providers/google/cloud/links/dataproc.py +0 -1
- airflow/providers/google/cloud/links/translate.py +91 -0
- airflow/providers/google/cloud/log/gcs_task_handler.py +2 -1
- airflow/providers/google/cloud/log/stackdriver_task_handler.py +11 -3
- airflow/providers/google/cloud/openlineage/utils.py +54 -21
- airflow/providers/google/cloud/operators/automl.py +5 -4
- airflow/providers/google/cloud/operators/bigquery.py +2 -341
- airflow/providers/google/cloud/operators/bigquery_dts.py +2 -1
- airflow/providers/google/cloud/operators/bigtable.py +2 -1
- airflow/providers/google/cloud/operators/cloud_batch.py +2 -1
- airflow/providers/google/cloud/operators/cloud_build.py +2 -1
- airflow/providers/google/cloud/operators/cloud_composer.py +2 -1
- airflow/providers/google/cloud/operators/cloud_memorystore.py +2 -1
- airflow/providers/google/cloud/operators/cloud_run.py +2 -1
- airflow/providers/google/cloud/operators/cloud_sql.py +2 -1
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +2 -1
- airflow/providers/google/cloud/operators/compute.py +2 -1
- airflow/providers/google/cloud/operators/datacatalog.py +2 -1
- airflow/providers/google/cloud/operators/dataflow.py +2 -517
- airflow/providers/google/cloud/operators/dataform.py +2 -1
- airflow/providers/google/cloud/operators/datafusion.py +2 -1
- airflow/providers/google/cloud/operators/dataplex.py +37 -31
- airflow/providers/google/cloud/operators/dataprep.py +2 -1
- airflow/providers/google/cloud/operators/dataproc.py +3 -633
- airflow/providers/google/cloud/operators/dataproc_metastore.py +2 -1
- airflow/providers/google/cloud/operators/datastore.py +2 -1
- airflow/providers/google/cloud/operators/dlp.py +2 -1
- airflow/providers/google/cloud/operators/functions.py +2 -1
- airflow/providers/google/cloud/operators/gcs.py +5 -4
- airflow/providers/google/cloud/operators/kubernetes_engine.py +2 -11
- airflow/providers/google/cloud/operators/life_sciences.py +2 -1
- airflow/providers/google/cloud/operators/mlengine.py +2 -1
- airflow/providers/google/cloud/operators/natural_language.py +3 -2
- airflow/providers/google/cloud/operators/pubsub.py +2 -1
- airflow/providers/google/cloud/operators/spanner.py +2 -1
- airflow/providers/google/cloud/operators/speech_to_text.py +2 -1
- airflow/providers/google/cloud/operators/stackdriver.py +2 -1
- airflow/providers/google/cloud/operators/tasks.py +3 -2
- airflow/providers/google/cloud/operators/text_to_speech.py +2 -1
- airflow/providers/google/cloud/operators/translate.py +622 -32
- airflow/providers/google/cloud/operators/translate_speech.py +2 -1
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +2 -93
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +3 -13
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +2 -17
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +2 -1
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +2 -1
- airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +2 -1
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +3 -13
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +2 -1
- airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +2 -1
- airflow/providers/google/cloud/operators/video_intelligence.py +2 -1
- airflow/providers/google/cloud/operators/vision.py +3 -2
- airflow/providers/google/cloud/operators/workflows.py +3 -2
- airflow/providers/google/cloud/secrets/secret_manager.py +2 -19
- airflow/providers/google/cloud/sensors/bigquery.py +2 -81
- airflow/providers/google/cloud/sensors/bigquery_dts.py +2 -1
- airflow/providers/google/cloud/sensors/bigtable.py +2 -1
- airflow/providers/google/cloud/sensors/cloud_composer.py +8 -94
- airflow/providers/google/cloud/sensors/cloud_storage_transfer_service.py +2 -1
- airflow/providers/google/cloud/sensors/dataflow.py +2 -1
- airflow/providers/google/cloud/sensors/dataform.py +2 -1
- airflow/providers/google/cloud/sensors/datafusion.py +2 -1
- airflow/providers/google/cloud/sensors/dataplex.py +2 -1
- airflow/providers/google/cloud/sensors/dataprep.py +2 -1
- airflow/providers/google/cloud/sensors/dataproc.py +2 -1
- airflow/providers/google/cloud/sensors/dataproc_metastore.py +2 -1
- airflow/providers/google/cloud/sensors/gcs.py +4 -36
- airflow/providers/google/cloud/sensors/pubsub.py +2 -1
- airflow/providers/google/cloud/sensors/tasks.py +2 -1
- airflow/providers/google/cloud/sensors/workflows.py +2 -1
- airflow/providers/google/cloud/transfers/adls_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/azure_blob_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +75 -18
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +9 -7
- airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +2 -1
- airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +1 -1
- airflow/providers/google/cloud/transfers/bigquery_to_sql.py +2 -1
- airflow/providers/google/cloud/transfers/calendar_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +13 -9
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/gcs_to_local.py +2 -1
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +2 -1
- airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/gdrive_to_local.py +2 -1
- airflow/providers/google/cloud/transfers/local_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/mssql_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/salesforce_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/sheets_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/sql_to_gcs.py +2 -1
- airflow/providers/google/cloud/triggers/bigquery.py +2 -1
- airflow/providers/google/cloud/triggers/bigquery_dts.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_batch.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_build.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_composer.py +3 -2
- airflow/providers/google/cloud/triggers/cloud_run.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_sql.py +1 -1
- airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py +2 -1
- airflow/providers/google/cloud/triggers/dataflow.py +2 -1
- airflow/providers/google/cloud/triggers/datafusion.py +2 -1
- airflow/providers/google/cloud/triggers/dataplex.py +1 -1
- airflow/providers/google/cloud/triggers/dataproc.py +2 -1
- airflow/providers/google/cloud/triggers/gcs.py +3 -2
- airflow/providers/google/cloud/triggers/kubernetes_engine.py +2 -1
- airflow/providers/google/cloud/triggers/mlengine.py +2 -1
- airflow/providers/google/cloud/triggers/pubsub.py +2 -1
- airflow/providers/google/cloud/triggers/vertex_ai.py +2 -1
- airflow/providers/google/cloud/utils/credentials_provider.py +1 -1
- airflow/providers/google/cloud/utils/dataform.py +1 -1
- airflow/providers/google/cloud/utils/field_validator.py +2 -1
- airflow/providers/google/cloud/utils/mlengine_operator_utils.py +2 -1
- airflow/providers/google/common/hooks/base_google.py +4 -11
- airflow/providers/google/common/hooks/discovery_api.py +1 -6
- airflow/providers/google/firebase/hooks/firestore.py +1 -1
- airflow/providers/google/firebase/operators/firestore.py +2 -1
- airflow/providers/google/get_provider_info.py +7 -22
- airflow/providers/google/marketing_platform/hooks/analytics_admin.py +2 -1
- airflow/providers/google/marketing_platform/hooks/campaign_manager.py +2 -3
- airflow/providers/google/marketing_platform/hooks/display_video.py +4 -3
- airflow/providers/google/marketing_platform/hooks/search_ads.py +6 -6
- airflow/providers/google/marketing_platform/operators/analytics_admin.py +2 -1
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +2 -42
- airflow/providers/google/marketing_platform/operators/display_video.py +2 -47
- airflow/providers/google/marketing_platform/operators/search_ads.py +2 -1
- airflow/providers/google/marketing_platform/sensors/campaign_manager.py +2 -7
- airflow/providers/google/marketing_platform/sensors/display_video.py +2 -13
- airflow/providers/google/suite/hooks/calendar.py +2 -8
- airflow/providers/google/suite/hooks/drive.py +2 -6
- airflow/providers/google/suite/hooks/sheets.py +2 -7
- airflow/providers/google/suite/operators/sheets.py +2 -7
- airflow/providers/google/suite/sensors/drive.py +2 -7
- airflow/providers/google/suite/transfers/gcs_to_gdrive.py +2 -7
- airflow/providers/google/suite/transfers/gcs_to_sheets.py +2 -7
- airflow/providers/google/suite/transfers/local_to_drive.py +2 -7
- airflow/providers/google/suite/transfers/sql_to_sheets.py +2 -7
- {apache_airflow_providers_google-10.26.0rc1.dist-info → apache_airflow_providers_google-11.0.0rc1.dist-info}/METADATA +10 -10
- apache_airflow_providers_google-11.0.0rc1.dist-info/RECORD +315 -0
- airflow/providers/google/marketing_platform/hooks/analytics.py +0 -211
- airflow/providers/google/marketing_platform/operators/analytics.py +0 -551
- apache_airflow_providers_google-10.26.0rc1.dist-info/RECORD +0 -317
- {apache_airflow_providers_google-10.26.0rc1.dist-info → apache_airflow_providers_google-11.0.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-10.26.0rc1.dist-info → apache_airflow_providers_google-11.0.0rc1.dist-info}/entry_points.txt +0 -0
@@ -19,8 +19,9 @@
|
|
19
19
|
|
20
20
|
from __future__ import annotations
|
21
21
|
|
22
|
+
from collections.abc import Sequence
|
22
23
|
from functools import cached_property
|
23
|
-
from typing import TYPE_CHECKING, Any
|
24
|
+
from typing import TYPE_CHECKING, Any
|
24
25
|
|
25
26
|
from google.oauth2.credentials import Credentials
|
26
27
|
from googleapiclient.discovery import build
|
@@ -42,10 +43,9 @@ class GoogleSearchAdsReportingHook(GoogleBaseHook):
|
|
42
43
|
self,
|
43
44
|
api_version: str | None = None,
|
44
45
|
gcp_conn_id: str = "google_search_ads_default",
|
46
|
+
**kwargs,
|
45
47
|
) -> None:
|
46
|
-
super().__init__(
|
47
|
-
gcp_conn_id=gcp_conn_id,
|
48
|
-
)
|
48
|
+
super().__init__(gcp_conn_id=gcp_conn_id, **kwargs)
|
49
49
|
self.api_version = api_version or self.default_api_version
|
50
50
|
|
51
51
|
def _get_config(self) -> None:
|
@@ -207,13 +207,13 @@ class GoogleSearchAdsHook(GoogleBaseHook):
|
|
207
207
|
self,
|
208
208
|
api_version: str = "v2",
|
209
209
|
gcp_conn_id: str = "google_cloud_default",
|
210
|
-
delegate_to: str | None = None,
|
211
210
|
impersonation_chain: str | Sequence[str] | None = None,
|
211
|
+
**kwargs,
|
212
212
|
) -> None:
|
213
213
|
super().__init__(
|
214
214
|
gcp_conn_id=gcp_conn_id,
|
215
|
-
delegate_to=delegate_to,
|
216
215
|
impersonation_chain=impersonation_chain,
|
216
|
+
**kwargs,
|
217
217
|
)
|
218
218
|
self.api_version = api_version
|
219
219
|
|
@@ -22,7 +22,8 @@ from __future__ import annotations
|
|
22
22
|
import json
|
23
23
|
import tempfile
|
24
24
|
import uuid
|
25
|
-
from
|
25
|
+
from collections.abc import Sequence
|
26
|
+
from typing import TYPE_CHECKING, Any
|
26
27
|
|
27
28
|
from googleapiclient import http
|
28
29
|
|
@@ -52,9 +53,6 @@ class GoogleCampaignManagerDeleteReportOperator(BaseOperator):
|
|
52
53
|
:param report_id: The ID of the report.
|
53
54
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
54
55
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
55
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
56
|
-
if any. For this to work, the service account making the request must have
|
57
|
-
domain-wide delegation enabled.
|
58
56
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
59
57
|
credentials, or chained list of accounts required to get the access_token
|
60
58
|
of the last account in the list, which will be impersonated in the request.
|
@@ -71,7 +69,6 @@ class GoogleCampaignManagerDeleteReportOperator(BaseOperator):
|
|
71
69
|
"report_name",
|
72
70
|
"api_version",
|
73
71
|
"gcp_conn_id",
|
74
|
-
"delegate_to",
|
75
72
|
"impersonation_chain",
|
76
73
|
)
|
77
74
|
|
@@ -83,7 +80,6 @@ class GoogleCampaignManagerDeleteReportOperator(BaseOperator):
|
|
83
80
|
report_id: str | None = None,
|
84
81
|
api_version: str = "v4",
|
85
82
|
gcp_conn_id: str = "google_cloud_default",
|
86
|
-
delegate_to: str | None = None,
|
87
83
|
impersonation_chain: str | Sequence[str] | None = None,
|
88
84
|
**kwargs,
|
89
85
|
) -> None:
|
@@ -98,13 +94,11 @@ class GoogleCampaignManagerDeleteReportOperator(BaseOperator):
|
|
98
94
|
self.report_id = report_id
|
99
95
|
self.api_version = api_version
|
100
96
|
self.gcp_conn_id = gcp_conn_id
|
101
|
-
self.delegate_to = delegate_to
|
102
97
|
self.impersonation_chain = impersonation_chain
|
103
98
|
|
104
99
|
def execute(self, context: Context) -> None:
|
105
100
|
hook = GoogleCampaignManagerHook(
|
106
101
|
gcp_conn_id=self.gcp_conn_id,
|
107
|
-
delegate_to=self.delegate_to,
|
108
102
|
api_version=self.api_version,
|
109
103
|
impersonation_chain=self.impersonation_chain,
|
110
104
|
)
|
@@ -143,9 +137,6 @@ class GoogleCampaignManagerDownloadReportOperator(BaseOperator):
|
|
143
137
|
:param chunk_size: File will be downloaded in chunks of this many bytes.
|
144
138
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
145
139
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
146
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
147
|
-
if any. For this to work, the service account making the request must have
|
148
|
-
domain-wide delegation enabled.
|
149
140
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
150
141
|
credentials, or chained list of accounts required to get the access_token
|
151
142
|
of the last account in the list, which will be impersonated in the request.
|
@@ -165,7 +156,6 @@ class GoogleCampaignManagerDownloadReportOperator(BaseOperator):
|
|
165
156
|
"chunk_size",
|
166
157
|
"api_version",
|
167
158
|
"gcp_conn_id",
|
168
|
-
"delegate_to",
|
169
159
|
"impersonation_chain",
|
170
160
|
)
|
171
161
|
|
@@ -181,7 +171,6 @@ class GoogleCampaignManagerDownloadReportOperator(BaseOperator):
|
|
181
171
|
chunk_size: int = 10 * 1024 * 1024,
|
182
172
|
api_version: str = "v4",
|
183
173
|
gcp_conn_id: str = "google_cloud_default",
|
184
|
-
delegate_to: str | None = None,
|
185
174
|
impersonation_chain: str | Sequence[str] | None = None,
|
186
175
|
**kwargs,
|
187
176
|
) -> None:
|
@@ -195,7 +184,6 @@ class GoogleCampaignManagerDownloadReportOperator(BaseOperator):
|
|
195
184
|
self.bucket_name = bucket_name
|
196
185
|
self.report_name = report_name
|
197
186
|
self.gcp_conn_id = gcp_conn_id
|
198
|
-
self.delegate_to = delegate_to
|
199
187
|
self.impersonation_chain = impersonation_chain
|
200
188
|
|
201
189
|
def _resolve_file_name(self, name: str) -> str:
|
@@ -215,13 +203,11 @@ class GoogleCampaignManagerDownloadReportOperator(BaseOperator):
|
|
215
203
|
def execute(self, context: Context) -> None:
|
216
204
|
hook = GoogleCampaignManagerHook(
|
217
205
|
gcp_conn_id=self.gcp_conn_id,
|
218
|
-
delegate_to=self.delegate_to,
|
219
206
|
api_version=self.api_version,
|
220
207
|
impersonation_chain=self.impersonation_chain,
|
221
208
|
)
|
222
209
|
gcs_hook = GCSHook(
|
223
210
|
gcp_conn_id=self.gcp_conn_id,
|
224
|
-
delegate_to=self.delegate_to,
|
225
211
|
impersonation_chain=self.impersonation_chain,
|
226
212
|
)
|
227
213
|
# Get name of the report
|
@@ -270,9 +256,6 @@ class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
|
270
256
|
:param report: Report to be created.
|
271
257
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
272
258
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
273
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
274
|
-
if any. For this to work, the service account making the request must have
|
275
|
-
domain-wide delegation enabled.
|
276
259
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
277
260
|
credentials, or chained list of accounts required to get the access_token
|
278
261
|
of the last account in the list, which will be impersonated in the request.
|
@@ -288,7 +271,6 @@ class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
|
288
271
|
"report",
|
289
272
|
"api_version",
|
290
273
|
"gcp_conn_id",
|
291
|
-
"delegate_to",
|
292
274
|
"impersonation_chain",
|
293
275
|
)
|
294
276
|
|
@@ -301,7 +283,6 @@ class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
|
301
283
|
report: dict[str, Any],
|
302
284
|
api_version: str = "v4",
|
303
285
|
gcp_conn_id: str = "google_cloud_default",
|
304
|
-
delegate_to: str | None = None,
|
305
286
|
impersonation_chain: str | Sequence[str] | None = None,
|
306
287
|
**kwargs,
|
307
288
|
) -> None:
|
@@ -310,7 +291,6 @@ class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
|
310
291
|
self.report = report
|
311
292
|
self.api_version = api_version
|
312
293
|
self.gcp_conn_id = gcp_conn_id
|
313
|
-
self.delegate_to = delegate_to
|
314
294
|
self.impersonation_chain = impersonation_chain
|
315
295
|
|
316
296
|
def prepare_template(self) -> None:
|
@@ -322,7 +302,6 @@ class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
|
322
302
|
def execute(self, context: Context):
|
323
303
|
hook = GoogleCampaignManagerHook(
|
324
304
|
gcp_conn_id=self.gcp_conn_id,
|
325
|
-
delegate_to=self.delegate_to,
|
326
305
|
api_version=self.api_version,
|
327
306
|
impersonation_chain=self.impersonation_chain,
|
328
307
|
)
|
@@ -351,9 +330,6 @@ class GoogleCampaignManagerRunReportOperator(BaseOperator):
|
|
351
330
|
:param synchronous: If set and true, tries to run the report synchronously.
|
352
331
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
353
332
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
354
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
355
|
-
if any. For this to work, the service account making the request must have
|
356
|
-
domain-wide delegation enabled.
|
357
333
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
358
334
|
credentials, or chained list of accounts required to get the access_token
|
359
335
|
of the last account in the list, which will be impersonated in the request.
|
@@ -370,7 +346,6 @@ class GoogleCampaignManagerRunReportOperator(BaseOperator):
|
|
370
346
|
"synchronous",
|
371
347
|
"api_version",
|
372
348
|
"gcp_conn_id",
|
373
|
-
"delegate_to",
|
374
349
|
"impersonation_chain",
|
375
350
|
)
|
376
351
|
|
@@ -382,7 +357,6 @@ class GoogleCampaignManagerRunReportOperator(BaseOperator):
|
|
382
357
|
synchronous: bool = False,
|
383
358
|
api_version: str = "v4",
|
384
359
|
gcp_conn_id: str = "google_cloud_default",
|
385
|
-
delegate_to: str | None = None,
|
386
360
|
impersonation_chain: str | Sequence[str] | None = None,
|
387
361
|
**kwargs,
|
388
362
|
) -> None:
|
@@ -392,13 +366,11 @@ class GoogleCampaignManagerRunReportOperator(BaseOperator):
|
|
392
366
|
self.synchronous = synchronous
|
393
367
|
self.api_version = api_version
|
394
368
|
self.gcp_conn_id = gcp_conn_id
|
395
|
-
self.delegate_to = delegate_to
|
396
369
|
self.impersonation_chain = impersonation_chain
|
397
370
|
|
398
371
|
def execute(self, context: Context):
|
399
372
|
hook = GoogleCampaignManagerHook(
|
400
373
|
gcp_conn_id=self.gcp_conn_id,
|
401
|
-
delegate_to=self.delegate_to,
|
402
374
|
api_version=self.api_version,
|
403
375
|
impersonation_chain=self.impersonation_chain,
|
404
376
|
)
|
@@ -438,9 +410,6 @@ class GoogleCampaignManagerBatchInsertConversionsOperator(BaseOperator):
|
|
438
410
|
:param max_failed_inserts: The maximum number of conversions that failed to be inserted
|
439
411
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
440
412
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
441
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
442
|
-
if any. For this to work, the service account making the request must have
|
443
|
-
domain-wide delegation enabled.
|
444
413
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
445
414
|
credentials, or chained list of accounts required to get the access_token
|
446
415
|
of the last account in the list, which will be impersonated in the request.
|
@@ -471,7 +440,6 @@ class GoogleCampaignManagerBatchInsertConversionsOperator(BaseOperator):
|
|
471
440
|
max_failed_inserts: int = 0,
|
472
441
|
api_version: str = "v4",
|
473
442
|
gcp_conn_id: str = "google_cloud_default",
|
474
|
-
delegate_to: str | None = None,
|
475
443
|
impersonation_chain: str | Sequence[str] | None = None,
|
476
444
|
**kwargs,
|
477
445
|
) -> None:
|
@@ -484,13 +452,11 @@ class GoogleCampaignManagerBatchInsertConversionsOperator(BaseOperator):
|
|
484
452
|
self.max_failed_inserts = max_failed_inserts
|
485
453
|
self.api_version = api_version
|
486
454
|
self.gcp_conn_id = gcp_conn_id
|
487
|
-
self.delegate_to = delegate_to
|
488
455
|
self.impersonation_chain = impersonation_chain
|
489
456
|
|
490
457
|
def execute(self, context: Context):
|
491
458
|
hook = GoogleCampaignManagerHook(
|
492
459
|
gcp_conn_id=self.gcp_conn_id,
|
493
|
-
delegate_to=self.delegate_to,
|
494
460
|
api_version=self.api_version,
|
495
461
|
impersonation_chain=self.impersonation_chain,
|
496
462
|
)
|
@@ -529,9 +495,6 @@ class GoogleCampaignManagerBatchUpdateConversionsOperator(BaseOperator):
|
|
529
495
|
:param max_failed_updates: The maximum number of conversions that failed to be updated
|
530
496
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
531
497
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
532
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
533
|
-
if any. For this to work, the service account making the request must have
|
534
|
-
domain-wide delegation enabled.
|
535
498
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
536
499
|
credentials, or chained list of accounts required to get the access_token
|
537
500
|
of the last account in the list, which will be impersonated in the request.
|
@@ -562,7 +525,6 @@ class GoogleCampaignManagerBatchUpdateConversionsOperator(BaseOperator):
|
|
562
525
|
max_failed_updates: int = 0,
|
563
526
|
api_version: str = "v4",
|
564
527
|
gcp_conn_id: str = "google_cloud_default",
|
565
|
-
delegate_to: str | None = None,
|
566
528
|
impersonation_chain: str | Sequence[str] | None = None,
|
567
529
|
**kwargs,
|
568
530
|
) -> None:
|
@@ -575,13 +537,11 @@ class GoogleCampaignManagerBatchUpdateConversionsOperator(BaseOperator):
|
|
575
537
|
self.max_failed_updates = max_failed_updates
|
576
538
|
self.api_version = api_version
|
577
539
|
self.gcp_conn_id = gcp_conn_id
|
578
|
-
self.delegate_to = delegate_to
|
579
540
|
self.impersonation_chain = impersonation_chain
|
580
541
|
|
581
542
|
def execute(self, context: Context):
|
582
543
|
hook = GoogleCampaignManagerHook(
|
583
544
|
gcp_conn_id=self.gcp_conn_id,
|
584
|
-
delegate_to=self.delegate_to,
|
585
545
|
api_version=self.api_version,
|
586
546
|
impersonation_chain=self.impersonation_chain,
|
587
547
|
)
|
@@ -24,7 +24,8 @@ import json
|
|
24
24
|
import shutil
|
25
25
|
import tempfile
|
26
26
|
import urllib.request
|
27
|
-
from
|
27
|
+
from collections.abc import Sequence
|
28
|
+
from typing import TYPE_CHECKING, Any
|
28
29
|
from urllib.parse import urlsplit
|
29
30
|
|
30
31
|
from airflow.exceptions import AirflowException
|
@@ -52,9 +53,6 @@ class GoogleDisplayVideo360CreateQueryOperator(BaseOperator):
|
|
52
53
|
https://developers.google.com/bid-manager/v2/queries#Query
|
53
54
|
:param api_version: The version of the api that will be requested for example 'v3'.
|
54
55
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
55
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
56
|
-
if any. For this to work, the service account making the request must have
|
57
|
-
domain-wide delegation enabled.
|
58
56
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
59
57
|
credentials, or chained list of accounts required to get the access_token
|
60
58
|
of the last account in the list, which will be impersonated in the request.
|
@@ -77,7 +75,6 @@ class GoogleDisplayVideo360CreateQueryOperator(BaseOperator):
|
|
77
75
|
body: dict[str, Any],
|
78
76
|
api_version: str = "v2",
|
79
77
|
gcp_conn_id: str = "google_cloud_default",
|
80
|
-
delegate_to: str | None = None,
|
81
78
|
impersonation_chain: str | Sequence[str] | None = None,
|
82
79
|
**kwargs,
|
83
80
|
) -> None:
|
@@ -85,7 +82,6 @@ class GoogleDisplayVideo360CreateQueryOperator(BaseOperator):
|
|
85
82
|
self.body = body
|
86
83
|
self.api_version = api_version
|
87
84
|
self.gcp_conn_id = gcp_conn_id
|
88
|
-
self.delegate_to = delegate_to
|
89
85
|
self.impersonation_chain = impersonation_chain
|
90
86
|
|
91
87
|
def prepare_template(self) -> None:
|
@@ -97,7 +93,6 @@ class GoogleDisplayVideo360CreateQueryOperator(BaseOperator):
|
|
97
93
|
def execute(self, context: Context) -> dict:
|
98
94
|
hook = GoogleDisplayVideo360Hook(
|
99
95
|
gcp_conn_id=self.gcp_conn_id,
|
100
|
-
delegate_to=self.delegate_to,
|
101
96
|
api_version=self.api_version,
|
102
97
|
impersonation_chain=self.impersonation_chain,
|
103
98
|
)
|
@@ -125,9 +120,6 @@ class GoogleDisplayVideo360DeleteReportOperator(BaseOperator):
|
|
125
120
|
:param report_name: Name of the report to delete.
|
126
121
|
:param api_version: The version of the api that will be requested for example 'v3'.
|
127
122
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
128
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
129
|
-
if any. For this to work, the service account making the request must have
|
130
|
-
domain-wide delegation enabled.
|
131
123
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
132
124
|
credentials, or chained list of accounts required to get the access_token
|
133
125
|
of the last account in the list, which will be impersonated in the request.
|
@@ -150,7 +142,6 @@ class GoogleDisplayVideo360DeleteReportOperator(BaseOperator):
|
|
150
142
|
report_name: str | None = None,
|
151
143
|
api_version: str = "v2",
|
152
144
|
gcp_conn_id: str = "google_cloud_default",
|
153
|
-
delegate_to: str | None = None,
|
154
145
|
impersonation_chain: str | Sequence[str] | None = None,
|
155
146
|
**kwargs,
|
156
147
|
) -> None:
|
@@ -159,7 +150,6 @@ class GoogleDisplayVideo360DeleteReportOperator(BaseOperator):
|
|
159
150
|
self.report_name = report_name
|
160
151
|
self.api_version = api_version
|
161
152
|
self.gcp_conn_id = gcp_conn_id
|
162
|
-
self.delegate_to = delegate_to
|
163
153
|
self.impersonation_chain = impersonation_chain
|
164
154
|
|
165
155
|
if report_name and report_id:
|
@@ -171,7 +161,6 @@ class GoogleDisplayVideo360DeleteReportOperator(BaseOperator):
|
|
171
161
|
def execute(self, context: Context) -> None:
|
172
162
|
hook = GoogleDisplayVideo360Hook(
|
173
163
|
gcp_conn_id=self.gcp_conn_id,
|
174
|
-
delegate_to=self.delegate_to,
|
175
164
|
api_version=self.api_version,
|
176
165
|
impersonation_chain=self.impersonation_chain,
|
177
166
|
)
|
@@ -208,9 +197,6 @@ class GoogleDisplayVideo360DownloadReportV2Operator(BaseOperator):
|
|
208
197
|
:param gzip: Option to compress local file or file data for upload
|
209
198
|
:param api_version: The version of the api that will be requested for example 'v3'.
|
210
199
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
211
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
212
|
-
if any. For this to work, the service account making the request must have
|
213
|
-
domain-wide delegation enabled.
|
214
200
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
215
201
|
credentials, or chained list of accounts required to get the access_token
|
216
202
|
of the last account in the list, which will be impersonated in the request.
|
@@ -240,7 +226,6 @@ class GoogleDisplayVideo360DownloadReportV2Operator(BaseOperator):
|
|
240
226
|
chunk_size: int = 10 * 1024 * 1024,
|
241
227
|
api_version: str = "v2",
|
242
228
|
gcp_conn_id: str = "google_cloud_default",
|
243
|
-
delegate_to: str | None = None,
|
244
229
|
impersonation_chain: str | Sequence[str] | None = None,
|
245
230
|
**kwargs,
|
246
231
|
) -> None:
|
@@ -253,7 +238,6 @@ class GoogleDisplayVideo360DownloadReportV2Operator(BaseOperator):
|
|
253
238
|
self.report_name = report_name
|
254
239
|
self.api_version = api_version
|
255
240
|
self.gcp_conn_id = gcp_conn_id
|
256
|
-
self.delegate_to = delegate_to
|
257
241
|
self.impersonation_chain = impersonation_chain
|
258
242
|
|
259
243
|
def _resolve_file_name(self, name: str) -> str:
|
@@ -269,13 +253,11 @@ class GoogleDisplayVideo360DownloadReportV2Operator(BaseOperator):
|
|
269
253
|
def execute(self, context: Context):
|
270
254
|
hook = GoogleDisplayVideo360Hook(
|
271
255
|
gcp_conn_id=self.gcp_conn_id,
|
272
|
-
delegate_to=self.delegate_to,
|
273
256
|
api_version=self.api_version,
|
274
257
|
impersonation_chain=self.impersonation_chain,
|
275
258
|
)
|
276
259
|
gcs_hook = GCSHook(
|
277
260
|
gcp_conn_id=self.gcp_conn_id,
|
278
|
-
delegate_to=self.delegate_to,
|
279
261
|
impersonation_chain=self.impersonation_chain,
|
280
262
|
)
|
281
263
|
|
@@ -333,9 +315,6 @@ class GoogleDisplayVideo360RunQueryOperator(BaseOperator):
|
|
333
315
|
https://developers.google.com/bid-manager/v2/queries/run
|
334
316
|
:param api_version: The version of the api that will be requested for example 'v3'.
|
335
317
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
336
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
337
|
-
if any. For this to work, the service account making the request must have
|
338
|
-
domain-wide delegation enabled.
|
339
318
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
340
319
|
credentials, or chained list of accounts required to get the access_token
|
341
320
|
of the last account in the list, which will be impersonated in the request.
|
@@ -359,7 +338,6 @@ class GoogleDisplayVideo360RunQueryOperator(BaseOperator):
|
|
359
338
|
parameters: dict[str, Any] | None = None,
|
360
339
|
api_version: str = "v2",
|
361
340
|
gcp_conn_id: str = "google_cloud_default",
|
362
|
-
delegate_to: str | None = None,
|
363
341
|
impersonation_chain: str | Sequence[str] | None = None,
|
364
342
|
**kwargs,
|
365
343
|
) -> None:
|
@@ -367,14 +345,12 @@ class GoogleDisplayVideo360RunQueryOperator(BaseOperator):
|
|
367
345
|
self.query_id = query_id
|
368
346
|
self.api_version = api_version
|
369
347
|
self.gcp_conn_id = gcp_conn_id
|
370
|
-
self.delegate_to = delegate_to
|
371
348
|
self.parameters = parameters
|
372
349
|
self.impersonation_chain = impersonation_chain
|
373
350
|
|
374
351
|
def execute(self, context: Context) -> dict:
|
375
352
|
hook = GoogleDisplayVideo360Hook(
|
376
353
|
gcp_conn_id=self.gcp_conn_id,
|
377
|
-
delegate_to=self.delegate_to,
|
378
354
|
api_version=self.api_version,
|
379
355
|
impersonation_chain=self.impersonation_chain,
|
380
356
|
)
|
@@ -422,7 +398,6 @@ class GoogleDisplayVideo360DownloadLineItemsOperator(BaseOperator):
|
|
422
398
|
gzip: bool = False,
|
423
399
|
api_version: str = "v1.1",
|
424
400
|
gcp_conn_id: str = "google_cloud_default",
|
425
|
-
delegate_to: str | None = None,
|
426
401
|
impersonation_chain: str | Sequence[str] | None = None,
|
427
402
|
**kwargs,
|
428
403
|
) -> None:
|
@@ -433,19 +408,16 @@ class GoogleDisplayVideo360DownloadLineItemsOperator(BaseOperator):
|
|
433
408
|
self.gzip = gzip
|
434
409
|
self.api_version = api_version
|
435
410
|
self.gcp_conn_id = gcp_conn_id
|
436
|
-
self.delegate_to = delegate_to
|
437
411
|
self.impersonation_chain = impersonation_chain
|
438
412
|
|
439
413
|
def execute(self, context: Context) -> str:
|
440
414
|
gcs_hook = GCSHook(
|
441
415
|
gcp_conn_id=self.gcp_conn_id,
|
442
|
-
delegate_to=self.delegate_to,
|
443
416
|
impersonation_chain=self.impersonation_chain,
|
444
417
|
)
|
445
418
|
hook = GoogleDisplayVideo360Hook(
|
446
419
|
gcp_conn_id=self.gcp_conn_id,
|
447
420
|
api_version=self.api_version,
|
448
|
-
delegate_to=self.delegate_to,
|
449
421
|
impersonation_chain=self.impersonation_chain,
|
450
422
|
)
|
451
423
|
|
@@ -498,7 +470,6 @@ class GoogleDisplayVideo360UploadLineItemsOperator(BaseOperator):
|
|
498
470
|
object_name: str,
|
499
471
|
api_version: str = "v1.1",
|
500
472
|
gcp_conn_id: str = "google_cloud_default",
|
501
|
-
delegate_to: str | None = None,
|
502
473
|
impersonation_chain: str | Sequence[str] | None = None,
|
503
474
|
**kwargs,
|
504
475
|
) -> None:
|
@@ -507,18 +478,15 @@ class GoogleDisplayVideo360UploadLineItemsOperator(BaseOperator):
|
|
507
478
|
self.object_name = object_name
|
508
479
|
self.api_version = api_version
|
509
480
|
self.gcp_conn_id = gcp_conn_id
|
510
|
-
self.delegate_to = delegate_to
|
511
481
|
self.impersonation_chain = impersonation_chain
|
512
482
|
|
513
483
|
def execute(self, context: Context) -> None:
|
514
484
|
gcs_hook = GCSHook(
|
515
485
|
gcp_conn_id=self.gcp_conn_id,
|
516
|
-
delegate_to=self.delegate_to,
|
517
486
|
impersonation_chain=self.impersonation_chain,
|
518
487
|
)
|
519
488
|
hook = GoogleDisplayVideo360Hook(
|
520
489
|
gcp_conn_id=self.gcp_conn_id,
|
521
|
-
delegate_to=self.delegate_to,
|
522
490
|
api_version=self.api_version,
|
523
491
|
impersonation_chain=self.impersonation_chain,
|
524
492
|
)
|
@@ -555,9 +523,6 @@ class GoogleDisplayVideo360CreateSDFDownloadTaskOperator(BaseOperator):
|
|
555
523
|
:param id_filter: Filters on entities by their entity IDs.
|
556
524
|
:param inventory_source_filter: Filters on Inventory Sources by their IDs.
|
557
525
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
558
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
559
|
-
if any. For this to work, the service account making the request must have
|
560
|
-
domain-wide delegation enabled.
|
561
526
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
562
527
|
credentials, or chained list of accounts required to get the access_token
|
563
528
|
of the last account in the list, which will be impersonated in the request.
|
@@ -579,7 +544,6 @@ class GoogleDisplayVideo360CreateSDFDownloadTaskOperator(BaseOperator):
|
|
579
544
|
body_request: dict[str, Any],
|
580
545
|
api_version: str = "v1",
|
581
546
|
gcp_conn_id: str = "google_cloud_default",
|
582
|
-
delegate_to: str | None = None,
|
583
547
|
impersonation_chain: str | Sequence[str] | None = None,
|
584
548
|
**kwargs,
|
585
549
|
) -> None:
|
@@ -587,13 +551,11 @@ class GoogleDisplayVideo360CreateSDFDownloadTaskOperator(BaseOperator):
|
|
587
551
|
self.body_request = body_request
|
588
552
|
self.api_version = api_version
|
589
553
|
self.gcp_conn_id = gcp_conn_id
|
590
|
-
self.delegate_to = delegate_to
|
591
554
|
self.impersonation_chain = impersonation_chain
|
592
555
|
|
593
556
|
def execute(self, context: Context) -> dict[str, Any]:
|
594
557
|
hook = GoogleDisplayVideo360Hook(
|
595
558
|
gcp_conn_id=self.gcp_conn_id,
|
596
|
-
delegate_to=self.delegate_to,
|
597
559
|
api_version=self.api_version,
|
598
560
|
impersonation_chain=self.impersonation_chain,
|
599
561
|
)
|
@@ -627,9 +589,6 @@ class GoogleDisplayVideo360SDFtoGCSOperator(BaseOperator):
|
|
627
589
|
:param id_filter: Filters on entities by their entity IDs.
|
628
590
|
:param inventory_source_filter: Filters on Inventory Sources by their IDs.
|
629
591
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
630
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
631
|
-
if any. For this to work, the service account making the request must have
|
632
|
-
domain-wide delegation enabled.
|
633
592
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
634
593
|
credentials, or chained list of accounts required to get the access_token
|
635
594
|
of the last account in the list, which will be impersonated in the request.
|
@@ -656,7 +615,6 @@ class GoogleDisplayVideo360SDFtoGCSOperator(BaseOperator):
|
|
656
615
|
gzip: bool = False,
|
657
616
|
api_version: str = "v1",
|
658
617
|
gcp_conn_id: str = "google_cloud_default",
|
659
|
-
delegate_to: str | None = None,
|
660
618
|
impersonation_chain: str | Sequence[str] | None = None,
|
661
619
|
**kwargs,
|
662
620
|
) -> None:
|
@@ -667,19 +625,16 @@ class GoogleDisplayVideo360SDFtoGCSOperator(BaseOperator):
|
|
667
625
|
self.gzip = gzip
|
668
626
|
self.api_version = api_version
|
669
627
|
self.gcp_conn_id = gcp_conn_id
|
670
|
-
self.delegate_to = delegate_to
|
671
628
|
self.impersonation_chain = impersonation_chain
|
672
629
|
|
673
630
|
def execute(self, context: Context) -> str:
|
674
631
|
hook = GoogleDisplayVideo360Hook(
|
675
632
|
gcp_conn_id=self.gcp_conn_id,
|
676
|
-
delegate_to=self.delegate_to,
|
677
633
|
api_version=self.api_version,
|
678
634
|
impersonation_chain=self.impersonation_chain,
|
679
635
|
)
|
680
636
|
gcs_hook = GCSHook(
|
681
637
|
gcp_conn_id=self.gcp_conn_id,
|
682
|
-
delegate_to=self.delegate_to,
|
683
638
|
impersonation_chain=self.impersonation_chain,
|
684
639
|
)
|
685
640
|
|
@@ -19,8 +19,9 @@
|
|
19
19
|
|
20
20
|
from __future__ import annotations
|
21
21
|
|
22
|
+
from collections.abc import Sequence
|
22
23
|
from functools import cached_property
|
23
|
-
from typing import TYPE_CHECKING, Any
|
24
|
+
from typing import TYPE_CHECKING, Any
|
24
25
|
|
25
26
|
from airflow.models import BaseOperator
|
26
27
|
from airflow.providers.google.marketing_platform.hooks.search_ads import GoogleSearchAdsReportingHook
|
@@ -19,7 +19,8 @@
|
|
19
19
|
|
20
20
|
from __future__ import annotations
|
21
21
|
|
22
|
-
from
|
22
|
+
from collections.abc import Sequence
|
23
|
+
from typing import TYPE_CHECKING
|
23
24
|
|
24
25
|
from airflow.providers.google.marketing_platform.hooks.campaign_manager import GoogleCampaignManagerHook
|
25
26
|
from airflow.sensors.base import BaseSensorOperator
|
@@ -45,9 +46,6 @@ class GoogleCampaignManagerReportSensor(BaseSensorOperator):
|
|
45
46
|
:param file_id: The ID of the report file.
|
46
47
|
:param api_version: The version of the api that will be requested, for example 'v4'.
|
47
48
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
48
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
49
|
-
if any. For this to work, the service account making the request must have
|
50
|
-
domain-wide delegation enabled.
|
51
49
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
52
50
|
credentials, or chained list of accounts required to get the access_token
|
53
51
|
of the last account in the list, which will be impersonated in the request.
|
@@ -68,7 +66,6 @@ class GoogleCampaignManagerReportSensor(BaseSensorOperator):
|
|
68
66
|
def poke(self, context: Context) -> bool:
|
69
67
|
hook = GoogleCampaignManagerHook(
|
70
68
|
gcp_conn_id=self.gcp_conn_id,
|
71
|
-
delegate_to=self.delegate_to,
|
72
69
|
api_version=self.api_version,
|
73
70
|
impersonation_chain=self.impersonation_chain,
|
74
71
|
)
|
@@ -84,7 +81,6 @@ class GoogleCampaignManagerReportSensor(BaseSensorOperator):
|
|
84
81
|
file_id: str,
|
85
82
|
api_version: str = "v4",
|
86
83
|
gcp_conn_id: str = "google_cloud_default",
|
87
|
-
delegate_to: str | None = None,
|
88
84
|
mode: str = "reschedule",
|
89
85
|
poke_interval: int = 60 * 5,
|
90
86
|
impersonation_chain: str | Sequence[str] | None = None,
|
@@ -98,5 +94,4 @@ class GoogleCampaignManagerReportSensor(BaseSensorOperator):
|
|
98
94
|
self.file_id = file_id
|
99
95
|
self.api_version = api_version
|
100
96
|
self.gcp_conn_id = gcp_conn_id
|
101
|
-
self.delegate_to = delegate_to
|
102
97
|
self.impersonation_chain = impersonation_chain
|
@@ -18,7 +18,8 @@
|
|
18
18
|
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
from
|
21
|
+
from collections.abc import Sequence
|
22
|
+
from typing import TYPE_CHECKING
|
22
23
|
|
23
24
|
from airflow.exceptions import AirflowException
|
24
25
|
from airflow.providers.google.marketing_platform.hooks.display_video import GoogleDisplayVideo360Hook
|
@@ -39,9 +40,6 @@ class GoogleDisplayVideo360GetSDFDownloadOperationSensor(BaseSensorOperator):
|
|
39
40
|
:param operation_name: The name of the operation resource
|
40
41
|
:param api_version: The version of the api that will be requested for example 'v1'.
|
41
42
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
42
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
43
|
-
if any. For this to work, the service account making the request must have
|
44
|
-
domain-wide delegation enabled.
|
45
43
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
46
44
|
credentials, or chained list of accounts required to get the access_token
|
47
45
|
of the last account in the list, which will be impersonated in the request.
|
@@ -63,7 +61,6 @@ class GoogleDisplayVideo360GetSDFDownloadOperationSensor(BaseSensorOperator):
|
|
63
61
|
operation_name: str,
|
64
62
|
api_version: str = "v1",
|
65
63
|
gcp_conn_id: str = "google_cloud_default",
|
66
|
-
delegate_to: str | None = None,
|
67
64
|
mode: str = "reschedule",
|
68
65
|
poke_interval: int = 60 * 5,
|
69
66
|
impersonation_chain: str | Sequence[str] | None = None,
|
@@ -76,13 +73,11 @@ class GoogleDisplayVideo360GetSDFDownloadOperationSensor(BaseSensorOperator):
|
|
76
73
|
self.operation_name = operation_name
|
77
74
|
self.api_version = api_version
|
78
75
|
self.gcp_conn_id = gcp_conn_id
|
79
|
-
self.delegate_to = delegate_to
|
80
76
|
self.impersonation_chain = impersonation_chain
|
81
77
|
|
82
78
|
def poke(self, context: Context) -> bool:
|
83
79
|
hook = GoogleDisplayVideo360Hook(
|
84
80
|
gcp_conn_id=self.gcp_conn_id,
|
85
|
-
delegate_to=self.delegate_to,
|
86
81
|
api_version=self.api_version,
|
87
82
|
impersonation_chain=self.impersonation_chain,
|
88
83
|
)
|
@@ -107,9 +102,6 @@ class GoogleDisplayVideo360RunQuerySensor(BaseSensorOperator):
|
|
107
102
|
:param report_id: Report ID for which you want to wait
|
108
103
|
:param api_version: The version of the api that will be requested for example 'v3'.
|
109
104
|
:param gcp_conn_id: The connection ID to use when fetching connection info.
|
110
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
111
|
-
if any. For this to work, the service account making the request must have
|
112
|
-
domain-wide delegation enabled.
|
113
105
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
114
106
|
credentials, or chained list of accounts required to get the access_token
|
115
107
|
of the last account in the list, which will be impersonated in the request.
|
@@ -133,7 +125,6 @@ class GoogleDisplayVideo360RunQuerySensor(BaseSensorOperator):
|
|
133
125
|
report_id: str,
|
134
126
|
api_version: str = "v2",
|
135
127
|
gcp_conn_id: str = "google_cloud_default",
|
136
|
-
delegate_to: str | None = None,
|
137
128
|
impersonation_chain: str | Sequence[str] | None = None,
|
138
129
|
**kwargs,
|
139
130
|
) -> None:
|
@@ -142,13 +133,11 @@ class GoogleDisplayVideo360RunQuerySensor(BaseSensorOperator):
|
|
142
133
|
self.report_id = report_id
|
143
134
|
self.api_version = api_version
|
144
135
|
self.gcp_conn_id = gcp_conn_id
|
145
|
-
self.delegate_to = delegate_to
|
146
136
|
self.impersonation_chain = impersonation_chain
|
147
137
|
|
148
138
|
def poke(self, context: Context) -> bool:
|
149
139
|
hook = GoogleDisplayVideo360Hook(
|
150
140
|
gcp_conn_id=self.gcp_conn_id,
|
151
|
-
delegate_to=self.delegate_to,
|
152
141
|
api_version=self.api_version,
|
153
142
|
impersonation_chain=self.impersonation_chain,
|
154
143
|
)
|