apache-airflow-providers-google 9.0.0rc1__py3-none-any.whl → 10.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/cloud/hooks/automl.py +5 -6
- airflow/providers/google/cloud/hooks/bigquery.py +5 -6
- airflow/providers/google/cloud/hooks/bigquery_dts.py +11 -8
- airflow/providers/google/cloud/hooks/bigtable.py +5 -6
- airflow/providers/google/cloud/hooks/cloud_build.py +14 -11
- airflow/providers/google/cloud/hooks/cloud_composer.py +16 -0
- airflow/providers/google/cloud/hooks/cloud_memorystore.py +5 -14
- airflow/providers/google/cloud/hooks/cloud_sql.py +5 -7
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +5 -5
- airflow/providers/google/cloud/hooks/compute.py +5 -6
- airflow/providers/google/cloud/hooks/compute_ssh.py +8 -12
- airflow/providers/google/cloud/hooks/datacatalog.py +5 -9
- airflow/providers/google/cloud/hooks/dataflow.py +14 -6
- airflow/providers/google/cloud/hooks/dataform.py +8 -0
- airflow/providers/google/cloud/hooks/datafusion.py +13 -6
- airflow/providers/google/cloud/hooks/dataplex.py +5 -8
- airflow/providers/google/cloud/hooks/dataproc.py +13 -8
- airflow/providers/google/cloud/hooks/dataproc_metastore.py +8 -0
- airflow/providers/google/cloud/hooks/datastore.py +5 -6
- airflow/providers/google/cloud/hooks/dlp.py +5 -9
- airflow/providers/google/cloud/hooks/functions.py +5 -6
- airflow/providers/google/cloud/hooks/gcs.py +6 -6
- airflow/providers/google/cloud/hooks/gdm.py +5 -6
- airflow/providers/google/cloud/hooks/kms.py +5 -9
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +6 -4
- airflow/providers/google/cloud/hooks/life_sciences.py +5 -9
- airflow/providers/google/cloud/hooks/mlengine.py +8 -0
- airflow/providers/google/cloud/hooks/natural_language.py +5 -9
- airflow/providers/google/cloud/hooks/os_login.py +5 -6
- airflow/providers/google/cloud/hooks/pubsub.py +5 -5
- airflow/providers/google/cloud/hooks/secret_manager.py +5 -9
- airflow/providers/google/cloud/hooks/spanner.py +5 -6
- airflow/providers/google/cloud/hooks/speech_to_text.py +5 -9
- airflow/providers/google/cloud/hooks/stackdriver.py +5 -6
- airflow/providers/google/cloud/hooks/tasks.py +5 -9
- airflow/providers/google/cloud/hooks/text_to_speech.py +5 -9
- airflow/providers/google/cloud/hooks/translate.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +5 -5
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +8 -0
- airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +8 -0
- airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +5 -6
- airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +8 -0
- airflow/providers/google/cloud/hooks/video_intelligence.py +5 -9
- airflow/providers/google/cloud/hooks/vision.py +5 -6
- airflow/providers/google/cloud/hooks/workflows.py +8 -0
- airflow/providers/google/cloud/operators/bigquery.py +1 -148
- airflow/providers/google/cloud/operators/cloud_build.py +0 -13
- airflow/providers/google/cloud/operators/cloud_composer.py +2 -68
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +0 -21
- airflow/providers/google/cloud/operators/dataflow.py +2 -72
- airflow/providers/google/cloud/operators/dataform.py +5 -141
- airflow/providers/google/cloud/operators/datafusion.py +0 -102
- airflow/providers/google/cloud/operators/dataplex.py +3 -61
- airflow/providers/google/cloud/operators/dataproc.py +5 -13
- airflow/providers/google/cloud/operators/datastore.py +2 -86
- airflow/providers/google/cloud/operators/gcs.py +1 -43
- airflow/providers/google/cloud/operators/mlengine.py +1 -123
- airflow/providers/google/cloud/operators/pubsub.py +0 -61
- airflow/providers/google/cloud/operators/stackdriver.py +0 -101
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +0 -26
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +0 -41
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +0 -39
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +0 -71
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +0 -71
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +0 -35
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +0 -41
- airflow/providers/google/cloud/sensors/bigquery.py +0 -24
- airflow/providers/google/cloud/sensors/cloud_composer.py +0 -10
- airflow/providers/google/cloud/sensors/dataflow.py +0 -42
- airflow/providers/google/cloud/sensors/dataform.py +0 -12
- airflow/providers/google/cloud/sensors/datafusion.py +0 -11
- airflow/providers/google/cloud/sensors/dataplex.py +0 -10
- airflow/providers/google/cloud/sensors/gcs.py +0 -44
- airflow/providers/google/cloud/sensors/pubsub.py +0 -11
- airflow/providers/google/cloud/transfers/adls_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +0 -10
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +0 -11
- airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +0 -11
- airflow/providers/google/cloud/transfers/calendar_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +0 -13
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_local.py +0 -11
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +0 -11
- airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/gdrive_to_local.py +0 -11
- airflow/providers/google/cloud/transfers/local_to_gcs.py +0 -9
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +0 -11
- airflow/providers/google/cloud/transfers/sheets_to_gcs.py +0 -12
- airflow/providers/google/cloud/transfers/sql_to_gcs.py +0 -11
- airflow/providers/google/cloud/triggers/bigquery_dts.py +0 -12
- airflow/providers/google/cloud/triggers/cloud_build.py +0 -11
- airflow/providers/google/cloud/triggers/cloud_composer.py +0 -9
- airflow/providers/google/cloud/triggers/dataflow.py +0 -7
- airflow/providers/google/cloud/triggers/datafusion.py +0 -11
- airflow/providers/google/cloud/triggers/dataproc.py +2 -8
- airflow/providers/google/cloud/triggers/kubernetes_engine.py +0 -4
- airflow/providers/google/cloud/triggers/mlengine.py +0 -3
- airflow/providers/google/common/hooks/discovery_api.py +0 -7
- airflow/providers/google/firebase/hooks/firestore.py +0 -10
- airflow/providers/google/get_provider_info.py +1 -0
- airflow/providers/google/marketing_platform/example_dags/example_display_video.py +0 -64
- airflow/providers/google/marketing_platform/hooks/campaign_manager.py +3 -3
- airflow/providers/google/marketing_platform/hooks/display_video.py +7 -38
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +22 -22
- airflow/providers/google/marketing_platform/operators/display_video.py +0 -284
- airflow/providers/google/marketing_platform/sensors/campaign_manager.py +3 -3
- airflow/providers/google/marketing_platform/sensors/display_video.py +0 -65
- airflow/providers/google/suite/transfers/gcs_to_gdrive.py +0 -4
- airflow/providers/google/suite/transfers/gcs_to_sheets.py +0 -4
- airflow/providers/google_vendor/googleads/interceptors/interceptor.py +1 -1
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/METADATA +34 -4
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/RECORD +123 -123
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/LICENSE +0 -0
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/NOTICE +0 -0
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/entry_points.txt +0 -0
- {apache_airflow_providers_google-9.0.0rc1.dist-info → apache_airflow_providers_google-10.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -110,7 +110,6 @@ class ClusterGenerator:
|
|
110
110
|
``pd-standard`` (Persistent Disk Hard Disk Drive).
|
111
111
|
:param worker_disk_size: Disk size for the worker nodes
|
112
112
|
:param num_preemptible_workers: The # of preemptible worker nodes to spin up
|
113
|
-
:param labels: dict of labels to add to the cluster
|
114
113
|
:param zone: The zone where the cluster will be located. Set to None to auto-zone. (templated)
|
115
114
|
:param network_uri: The network uri to be used for machine communication, cannot be
|
116
115
|
specified with subnetwork_uri
|
@@ -412,10 +411,13 @@ class DataprocCreateClusterOperator(GoogleCloudBaseOperator):
|
|
412
411
|
For more information on how to use this operator, take a look at the guide:
|
413
412
|
:ref:`howto/operator:DataprocCreateClusterOperator`
|
414
413
|
|
415
|
-
:param project_id: The ID of the
|
414
|
+
:param project_id: The ID of the Google cloud project in which
|
416
415
|
to create the cluster. (templated)
|
417
416
|
:param cluster_name: Name of the cluster to create
|
418
|
-
:param labels: Labels that will be assigned to created cluster
|
417
|
+
:param labels: Labels that will be assigned to created cluster. Please, notice that
|
418
|
+
adding labels to ClusterConfig object in cluster_config parameter will not lead
|
419
|
+
to adding labels to the cluster. Labels for the clusters could be only set by passing
|
420
|
+
values to parameter of DataprocCreateCluster operator.
|
419
421
|
:param cluster_config: Required. The cluster config to create.
|
420
422
|
If a dict is provided, it must be of the same form as the protobuf message
|
421
423
|
:class:`~google.cloud.dataproc_v1.types.ClusterConfig`
|
@@ -927,9 +929,6 @@ class DataprocJobBaseOperator(GoogleCloudBaseOperator):
|
|
927
929
|
:param dataproc_jars: HCFS URIs of jar files to add to the CLASSPATH of the Hive server and Hadoop
|
928
930
|
MapReduce (MR) tasks. Can contain Hive SerDes and UDFs. (templated)
|
929
931
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
930
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
931
|
-
if any. For this to work, the service account making the request must have
|
932
|
-
domain-wide delegation enabled.
|
933
932
|
:param labels: The labels to associate with this job. Label keys must contain 1 to 63 characters,
|
934
933
|
and must conform to RFC 1035. Label values may be empty, but, if present, must contain 1 to 63
|
935
934
|
characters, and must conform to RFC 1035. No more than 32 labels can be associated with a job.
|
@@ -975,7 +974,6 @@ class DataprocJobBaseOperator(GoogleCloudBaseOperator):
|
|
975
974
|
dataproc_properties: dict | None = None,
|
976
975
|
dataproc_jars: list[str] | None = None,
|
977
976
|
gcp_conn_id: str = "google_cloud_default",
|
978
|
-
delegate_to: str | None = None,
|
979
977
|
labels: dict | None = None,
|
980
978
|
job_error_states: set[str] | None = None,
|
981
979
|
impersonation_chain: str | Sequence[str] | None = None,
|
@@ -988,11 +986,6 @@ class DataprocJobBaseOperator(GoogleCloudBaseOperator):
|
|
988
986
|
if deferrable and polling_interval_seconds <= 0:
|
989
987
|
raise ValueError("Invalid value for polling_interval_seconds. Expected value greater than 0")
|
990
988
|
self.gcp_conn_id = gcp_conn_id
|
991
|
-
if delegate_to:
|
992
|
-
warnings.warn(
|
993
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
994
|
-
)
|
995
|
-
self.delegate_to = delegate_to
|
996
989
|
self.labels = labels
|
997
990
|
self.job_name = job_name
|
998
991
|
self.cluster_name = cluster_name
|
@@ -1060,7 +1053,6 @@ class DataprocJobBaseOperator(GoogleCloudBaseOperator):
|
|
1060
1053
|
job_id=job_id,
|
1061
1054
|
project_id=self.project_id,
|
1062
1055
|
region=self.region,
|
1063
|
-
delegate_to=self.delegate_to,
|
1064
1056
|
gcp_conn_id=self.gcp_conn_id,
|
1065
1057
|
impersonation_chain=self.impersonation_chain,
|
1066
1058
|
polling_interval_seconds=self.polling_interval_seconds,
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"""This module contains Google Datastore operators."""
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
import warnings
|
22
21
|
from typing import TYPE_CHECKING, Any, Sequence
|
23
22
|
|
24
23
|
from airflow.exceptions import AirflowException
|
@@ -46,15 +45,12 @@ class CloudDatastoreExportEntitiesOperator(GoogleCloudBaseOperator):
|
|
46
45
|
.. seealso::
|
47
46
|
https://cloud.google.com/datastore/docs/export-import-entities
|
48
47
|
|
49
|
-
:param bucket: name of the cloud storage bucket to
|
48
|
+
:param bucket: name of the cloud storage bucket to back up data
|
50
49
|
:param namespace: optional namespace path in the specified Cloud Storage bucket
|
51
|
-
to
|
50
|
+
to back up data. If this namespace does not exist in GCS, it will be created.
|
52
51
|
:param datastore_conn_id: the name of the Datastore connection id to use
|
53
52
|
:param cloud_storage_conn_id: the name of the cloud storage connection id to
|
54
53
|
force-write backup
|
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
54
|
:param entity_filter: description of what data from the project is included in the
|
59
55
|
export, refer to
|
60
56
|
https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/EntityFilter
|
@@ -89,7 +85,6 @@ class CloudDatastoreExportEntitiesOperator(GoogleCloudBaseOperator):
|
|
89
85
|
namespace: str | None = None,
|
90
86
|
datastore_conn_id: str = "google_cloud_default",
|
91
87
|
cloud_storage_conn_id: str = "google_cloud_default",
|
92
|
-
delegate_to: str | None = None,
|
93
88
|
entity_filter: dict | None = None,
|
94
89
|
labels: dict | None = None,
|
95
90
|
polling_interval_in_seconds: int = 10,
|
@@ -101,11 +96,6 @@ class CloudDatastoreExportEntitiesOperator(GoogleCloudBaseOperator):
|
|
101
96
|
super().__init__(**kwargs)
|
102
97
|
self.datastore_conn_id = datastore_conn_id
|
103
98
|
self.cloud_storage_conn_id = cloud_storage_conn_id
|
104
|
-
if delegate_to:
|
105
|
-
warnings.warn(
|
106
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
107
|
-
)
|
108
|
-
self.delegate_to = delegate_to
|
109
99
|
self.bucket = bucket
|
110
100
|
self.namespace = namespace
|
111
101
|
self.entity_filter = entity_filter
|
@@ -126,7 +116,6 @@ class CloudDatastoreExportEntitiesOperator(GoogleCloudBaseOperator):
|
|
126
116
|
|
127
117
|
ds_hook = DatastoreHook(
|
128
118
|
gcp_conn_id=self.datastore_conn_id,
|
129
|
-
delegate_to=self.delegate_to,
|
130
119
|
impersonation_chain=self.impersonation_chain,
|
131
120
|
)
|
132
121
|
result = ds_hook.export_to_storage_bucket(
|
@@ -172,9 +161,6 @@ class CloudDatastoreImportEntitiesOperator(GoogleCloudBaseOperator):
|
|
172
161
|
https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/EntityFilter
|
173
162
|
:param labels: client-assigned labels for cloud storage
|
174
163
|
:param datastore_conn_id: the name of the connection id to use
|
175
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
176
|
-
if any. For this to work, the service account making the request must have
|
177
|
-
domain-wide delegation enabled.
|
178
164
|
:param polling_interval_in_seconds: number of seconds to wait before polling for
|
179
165
|
execution status again
|
180
166
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
@@ -206,7 +192,6 @@ class CloudDatastoreImportEntitiesOperator(GoogleCloudBaseOperator):
|
|
206
192
|
entity_filter: dict | None = None,
|
207
193
|
labels: dict | None = None,
|
208
194
|
datastore_conn_id: str = "google_cloud_default",
|
209
|
-
delegate_to: str | None = None,
|
210
195
|
polling_interval_in_seconds: float = 10,
|
211
196
|
project_id: str | None = None,
|
212
197
|
impersonation_chain: str | Sequence[str] | None = None,
|
@@ -214,11 +199,6 @@ class CloudDatastoreImportEntitiesOperator(GoogleCloudBaseOperator):
|
|
214
199
|
) -> None:
|
215
200
|
super().__init__(**kwargs)
|
216
201
|
self.datastore_conn_id = datastore_conn_id
|
217
|
-
if delegate_to:
|
218
|
-
warnings.warn(
|
219
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
220
|
-
)
|
221
|
-
self.delegate_to = delegate_to
|
222
202
|
self.bucket = bucket
|
223
203
|
self.file = file
|
224
204
|
self.namespace = namespace
|
@@ -232,7 +212,6 @@ class CloudDatastoreImportEntitiesOperator(GoogleCloudBaseOperator):
|
|
232
212
|
self.log.info("Importing data from Cloud Storage bucket %s", self.bucket)
|
233
213
|
ds_hook = DatastoreHook(
|
234
214
|
self.datastore_conn_id,
|
235
|
-
self.delegate_to,
|
236
215
|
impersonation_chain=self.impersonation_chain,
|
237
216
|
)
|
238
217
|
result = ds_hook.import_from_storage_bucket(
|
@@ -267,9 +246,6 @@ class CloudDatastoreAllocateIdsOperator(GoogleCloudBaseOperator):
|
|
267
246
|
|
268
247
|
:param partial_keys: a list of partial keys.
|
269
248
|
:param project_id: Google Cloud project ID against which to make the request.
|
270
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
271
|
-
if any. For this to work, the service account making the request must have
|
272
|
-
domain-wide delegation enabled.
|
273
249
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
274
250
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
275
251
|
credentials, or chained list of accounts required to get the access_token
|
@@ -292,7 +268,6 @@ class CloudDatastoreAllocateIdsOperator(GoogleCloudBaseOperator):
|
|
292
268
|
*,
|
293
269
|
partial_keys: list,
|
294
270
|
project_id: str | None = None,
|
295
|
-
delegate_to: str | None = None,
|
296
271
|
gcp_conn_id: str = "google_cloud_default",
|
297
272
|
impersonation_chain: str | Sequence[str] | None = None,
|
298
273
|
**kwargs,
|
@@ -302,11 +277,6 @@ class CloudDatastoreAllocateIdsOperator(GoogleCloudBaseOperator):
|
|
302
277
|
self.partial_keys = partial_keys
|
303
278
|
self.gcp_conn_id = gcp_conn_id
|
304
279
|
self.project_id = project_id
|
305
|
-
if delegate_to:
|
306
|
-
warnings.warn(
|
307
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
308
|
-
)
|
309
|
-
self.delegate_to = delegate_to
|
310
280
|
self.impersonation_chain = impersonation_chain
|
311
281
|
|
312
282
|
def execute(self, context: Context) -> list:
|
@@ -335,9 +305,6 @@ class CloudDatastoreBeginTransactionOperator(GoogleCloudBaseOperator):
|
|
335
305
|
|
336
306
|
:param transaction_options: Options for a new transaction.
|
337
307
|
:param project_id: Google Cloud project ID against which to make the request.
|
338
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
339
|
-
if any. For this to work, the service account making the request must have
|
340
|
-
domain-wide delegation enabled.
|
341
308
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
342
309
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
343
310
|
credentials, or chained list of accounts required to get the access_token
|
@@ -359,7 +326,6 @@ class CloudDatastoreBeginTransactionOperator(GoogleCloudBaseOperator):
|
|
359
326
|
*,
|
360
327
|
transaction_options: dict[str, Any],
|
361
328
|
project_id: str | None = None,
|
362
|
-
delegate_to: str | None = None,
|
363
329
|
gcp_conn_id: str = "google_cloud_default",
|
364
330
|
impersonation_chain: str | Sequence[str] | None = None,
|
365
331
|
**kwargs,
|
@@ -369,11 +335,6 @@ class CloudDatastoreBeginTransactionOperator(GoogleCloudBaseOperator):
|
|
369
335
|
self.transaction_options = transaction_options
|
370
336
|
self.gcp_conn_id = gcp_conn_id
|
371
337
|
self.project_id = project_id
|
372
|
-
if delegate_to:
|
373
|
-
warnings.warn(
|
374
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
375
|
-
)
|
376
|
-
self.delegate_to = delegate_to
|
377
338
|
self.impersonation_chain = impersonation_chain
|
378
339
|
|
379
340
|
def execute(self, context: Context) -> str:
|
@@ -401,9 +362,6 @@ class CloudDatastoreCommitOperator(GoogleCloudBaseOperator):
|
|
401
362
|
|
402
363
|
:param body: the body of the commit request.
|
403
364
|
:param project_id: Google Cloud project ID against which to make the request.
|
404
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
405
|
-
if any. For this to work, the service account making the request must have
|
406
|
-
domain-wide delegation enabled.
|
407
365
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
408
366
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
409
367
|
credentials, or chained list of accounts required to get the access_token
|
@@ -426,7 +384,6 @@ class CloudDatastoreCommitOperator(GoogleCloudBaseOperator):
|
|
426
384
|
*,
|
427
385
|
body: dict[str, Any],
|
428
386
|
project_id: str | None = None,
|
429
|
-
delegate_to: str | None = None,
|
430
387
|
gcp_conn_id: str = "google_cloud_default",
|
431
388
|
impersonation_chain: str | Sequence[str] | None = None,
|
432
389
|
**kwargs,
|
@@ -436,11 +393,6 @@ class CloudDatastoreCommitOperator(GoogleCloudBaseOperator):
|
|
436
393
|
self.body = body
|
437
394
|
self.gcp_conn_id = gcp_conn_id
|
438
395
|
self.project_id = project_id
|
439
|
-
if delegate_to:
|
440
|
-
warnings.warn(
|
441
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
442
|
-
)
|
443
|
-
self.delegate_to = delegate_to
|
444
396
|
self.impersonation_chain = impersonation_chain
|
445
397
|
|
446
398
|
def execute(self, context: Context) -> dict:
|
@@ -469,9 +421,6 @@ class CloudDatastoreRollbackOperator(GoogleCloudBaseOperator):
|
|
469
421
|
|
470
422
|
:param transaction: the transaction to roll back.
|
471
423
|
:param project_id: Google Cloud project ID against which to make the request.
|
472
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
473
|
-
if any. For this to work, the service account making the request must have
|
474
|
-
domain-wide delegation enabled.
|
475
424
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
476
425
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
477
426
|
credentials, or chained list of accounts required to get the access_token
|
@@ -493,7 +442,6 @@ class CloudDatastoreRollbackOperator(GoogleCloudBaseOperator):
|
|
493
442
|
*,
|
494
443
|
transaction: str,
|
495
444
|
project_id: str | None = None,
|
496
|
-
delegate_to: str | None = None,
|
497
445
|
gcp_conn_id: str = "google_cloud_default",
|
498
446
|
impersonation_chain: str | Sequence[str] | None = None,
|
499
447
|
**kwargs,
|
@@ -503,11 +451,6 @@ class CloudDatastoreRollbackOperator(GoogleCloudBaseOperator):
|
|
503
451
|
self.transaction = transaction
|
504
452
|
self.gcp_conn_id = gcp_conn_id
|
505
453
|
self.project_id = project_id
|
506
|
-
if delegate_to:
|
507
|
-
warnings.warn(
|
508
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
509
|
-
)
|
510
|
-
self.delegate_to = delegate_to
|
511
454
|
self.impersonation_chain = impersonation_chain
|
512
455
|
|
513
456
|
def execute(self, context: Context) -> None:
|
@@ -534,9 +477,6 @@ class CloudDatastoreRunQueryOperator(GoogleCloudBaseOperator):
|
|
534
477
|
|
535
478
|
:param body: the body of the query request.
|
536
479
|
:param project_id: Google Cloud project ID against which to make the request.
|
537
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
538
|
-
if any. For this to work, the service account making the request must have
|
539
|
-
domain-wide delegation enabled.
|
540
480
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
541
481
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
542
482
|
credentials, or chained list of accounts required to get the access_token
|
@@ -558,7 +498,6 @@ class CloudDatastoreRunQueryOperator(GoogleCloudBaseOperator):
|
|
558
498
|
*,
|
559
499
|
body: dict[str, Any],
|
560
500
|
project_id: str | None = None,
|
561
|
-
delegate_to: str | None = None,
|
562
501
|
gcp_conn_id: str = "google_cloud_default",
|
563
502
|
impersonation_chain: str | Sequence[str] | None = None,
|
564
503
|
**kwargs,
|
@@ -568,11 +507,6 @@ class CloudDatastoreRunQueryOperator(GoogleCloudBaseOperator):
|
|
568
507
|
self.body = body
|
569
508
|
self.gcp_conn_id = gcp_conn_id
|
570
509
|
self.project_id = project_id
|
571
|
-
if delegate_to:
|
572
|
-
warnings.warn(
|
573
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
574
|
-
)
|
575
|
-
self.delegate_to = delegate_to
|
576
510
|
self.impersonation_chain = impersonation_chain
|
577
511
|
|
578
512
|
def execute(self, context: Context) -> dict:
|
@@ -599,9 +533,6 @@ class CloudDatastoreGetOperationOperator(GoogleCloudBaseOperator):
|
|
599
533
|
https://cloud.google.com/datastore/docs/reference/data/rest/v1/projects.operations/get
|
600
534
|
|
601
535
|
:param name: the name of the operation resource.
|
602
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
603
|
-
if any. For this to work, the service account making the request must have
|
604
|
-
domain-wide delegation enabled.
|
605
536
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
606
537
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
607
538
|
credentials, or chained list of accounts required to get the access_token
|
@@ -622,7 +553,6 @@ class CloudDatastoreGetOperationOperator(GoogleCloudBaseOperator):
|
|
622
553
|
self,
|
623
554
|
*,
|
624
555
|
name: str,
|
625
|
-
delegate_to: str | None = None,
|
626
556
|
gcp_conn_id: str = "google_cloud_default",
|
627
557
|
impersonation_chain: str | Sequence[str] | None = None,
|
628
558
|
**kwargs,
|
@@ -631,11 +561,6 @@ class CloudDatastoreGetOperationOperator(GoogleCloudBaseOperator):
|
|
631
561
|
|
632
562
|
self.name = name
|
633
563
|
self.gcp_conn_id = gcp_conn_id
|
634
|
-
if delegate_to:
|
635
|
-
warnings.warn(
|
636
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
637
|
-
)
|
638
|
-
self.delegate_to = delegate_to
|
639
564
|
self.impersonation_chain = impersonation_chain
|
640
565
|
|
641
566
|
def execute(self, context: Context):
|
@@ -659,9 +584,6 @@ class CloudDatastoreDeleteOperationOperator(GoogleCloudBaseOperator):
|
|
659
584
|
https://cloud.google.com/datastore/docs/reference/data/rest/v1/projects.operations/delete
|
660
585
|
|
661
586
|
:param name: the name of the operation resource.
|
662
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
663
|
-
if any. For this to work, the service account making the request must have
|
664
|
-
domain-wide delegation enabled.
|
665
587
|
:param gcp_conn_id: The connection ID to use connecting to Google Cloud.
|
666
588
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
667
589
|
credentials, or chained list of accounts required to get the access_token
|
@@ -682,7 +604,6 @@ class CloudDatastoreDeleteOperationOperator(GoogleCloudBaseOperator):
|
|
682
604
|
self,
|
683
605
|
*,
|
684
606
|
name: str,
|
685
|
-
delegate_to: str | None = None,
|
686
607
|
gcp_conn_id: str = "google_cloud_default",
|
687
608
|
impersonation_chain: str | Sequence[str] | None = None,
|
688
609
|
**kwargs,
|
@@ -691,11 +612,6 @@ class CloudDatastoreDeleteOperationOperator(GoogleCloudBaseOperator):
|
|
691
612
|
|
692
613
|
self.name = name
|
693
614
|
self.gcp_conn_id = gcp_conn_id
|
694
|
-
if delegate_to:
|
695
|
-
warnings.warn(
|
696
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
697
|
-
)
|
698
|
-
self.delegate_to = delegate_to
|
699
615
|
self.impersonation_chain = impersonation_chain
|
700
616
|
|
701
617
|
def execute(self, context: Context) -> None:
|
@@ -21,7 +21,6 @@ from __future__ import annotations
|
|
21
21
|
import datetime
|
22
22
|
import subprocess
|
23
23
|
import sys
|
24
|
-
import warnings
|
25
24
|
from pathlib import Path
|
26
25
|
from tempfile import NamedTemporaryFile, TemporaryDirectory
|
27
26
|
from typing import TYPE_CHECKING, Sequence
|
@@ -74,9 +73,6 @@ class GCSCreateBucketOperator(GoogleCloudBaseOperator):
|
|
74
73
|
:param project_id: The ID of the Google Cloud Project. (templated)
|
75
74
|
:param labels: User-provided labels, in key/value pairs.
|
76
75
|
:param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud.
|
77
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
78
|
-
if any. For this to work, the service account making the request must have
|
79
|
-
domain-wide delegation enabled.
|
80
76
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
81
77
|
credentials, or chained list of accounts required to get the access_token
|
82
78
|
of the last account in the list, which will be impersonated in the request.
|
@@ -122,7 +118,6 @@ class GCSCreateBucketOperator(GoogleCloudBaseOperator):
|
|
122
118
|
project_id: str | None = None,
|
123
119
|
labels: dict | None = None,
|
124
120
|
gcp_conn_id: str = "google_cloud_default",
|
125
|
-
delegate_to: str | None = None,
|
126
121
|
impersonation_chain: str | Sequence[str] | None = None,
|
127
122
|
**kwargs,
|
128
123
|
) -> None:
|
@@ -134,17 +129,11 @@ class GCSCreateBucketOperator(GoogleCloudBaseOperator):
|
|
134
129
|
self.project_id = project_id
|
135
130
|
self.labels = labels
|
136
131
|
self.gcp_conn_id = gcp_conn_id
|
137
|
-
if delegate_to:
|
138
|
-
warnings.warn(
|
139
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
140
|
-
)
|
141
|
-
self.delegate_to = delegate_to
|
142
132
|
self.impersonation_chain = impersonation_chain
|
143
133
|
|
144
134
|
def execute(self, context: Context) -> None:
|
145
135
|
hook = GCSHook(
|
146
136
|
gcp_conn_id=self.gcp_conn_id,
|
147
|
-
delegate_to=self.delegate_to,
|
148
137
|
impersonation_chain=self.impersonation_chain,
|
149
138
|
)
|
150
139
|
StorageLink.persist(
|
@@ -177,12 +166,9 @@ class GCSListObjectsOperator(GoogleCloudBaseOperator):
|
|
177
166
|
:param prefix: Prefix string which filters objects whose name begin with
|
178
167
|
this prefix. (templated)
|
179
168
|
:param delimiter: The delimiter by which you want to filter the objects. (templated)
|
180
|
-
For
|
169
|
+
For example, to lists the CSV files from in a directory in GCS you would use
|
181
170
|
delimiter='.csv'.
|
182
171
|
:param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud.
|
183
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
184
|
-
if any. For this to work, the service account making the request must have
|
185
|
-
domain-wide delegation enabled.
|
186
172
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
187
173
|
credentials, or chained list of accounts required to get the access_token
|
188
174
|
of the last account in the list, which will be impersonated in the request.
|
@@ -223,7 +209,6 @@ class GCSListObjectsOperator(GoogleCloudBaseOperator):
|
|
223
209
|
prefix: str | None = None,
|
224
210
|
delimiter: str | None = None,
|
225
211
|
gcp_conn_id: str = "google_cloud_default",
|
226
|
-
delegate_to: str | None = None,
|
227
212
|
impersonation_chain: str | Sequence[str] | None = None,
|
228
213
|
**kwargs,
|
229
214
|
) -> None:
|
@@ -232,18 +217,12 @@ class GCSListObjectsOperator(GoogleCloudBaseOperator):
|
|
232
217
|
self.prefix = prefix
|
233
218
|
self.delimiter = delimiter
|
234
219
|
self.gcp_conn_id = gcp_conn_id
|
235
|
-
if delegate_to:
|
236
|
-
warnings.warn(
|
237
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
238
|
-
)
|
239
|
-
self.delegate_to = delegate_to
|
240
220
|
self.impersonation_chain = impersonation_chain
|
241
221
|
|
242
222
|
def execute(self, context: Context) -> list:
|
243
223
|
|
244
224
|
hook = GCSHook(
|
245
225
|
gcp_conn_id=self.gcp_conn_id,
|
246
|
-
delegate_to=self.delegate_to,
|
247
226
|
impersonation_chain=self.impersonation_chain,
|
248
227
|
)
|
249
228
|
|
@@ -276,9 +255,6 @@ class GCSDeleteObjectsOperator(GoogleCloudBaseOperator):
|
|
276
255
|
:param prefix: Prefix of objects to delete. All objects matching this
|
277
256
|
prefix in the bucket will be deleted.
|
278
257
|
:param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud.
|
279
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
280
|
-
if any. For this to work, the service account making the request must have
|
281
|
-
domain-wide delegation enabled.
|
282
258
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
283
259
|
credentials, or chained list of accounts required to get the access_token
|
284
260
|
of the last account in the list, which will be impersonated in the request.
|
@@ -303,7 +279,6 @@ class GCSDeleteObjectsOperator(GoogleCloudBaseOperator):
|
|
303
279
|
objects: list[str] | None = None,
|
304
280
|
prefix: str | None = None,
|
305
281
|
gcp_conn_id: str = "google_cloud_default",
|
306
|
-
delegate_to: str | None = None,
|
307
282
|
impersonation_chain: str | Sequence[str] | None = None,
|
308
283
|
**kwargs,
|
309
284
|
) -> None:
|
@@ -312,11 +287,6 @@ class GCSDeleteObjectsOperator(GoogleCloudBaseOperator):
|
|
312
287
|
self.objects = objects
|
313
288
|
self.prefix = prefix
|
314
289
|
self.gcp_conn_id = gcp_conn_id
|
315
|
-
if delegate_to:
|
316
|
-
warnings.warn(
|
317
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
318
|
-
)
|
319
|
-
self.delegate_to = delegate_to
|
320
290
|
self.impersonation_chain = impersonation_chain
|
321
291
|
|
322
292
|
if objects is None and prefix is None:
|
@@ -330,7 +300,6 @@ class GCSDeleteObjectsOperator(GoogleCloudBaseOperator):
|
|
330
300
|
def execute(self, context: Context) -> None:
|
331
301
|
hook = GCSHook(
|
332
302
|
gcp_conn_id=self.gcp_conn_id,
|
333
|
-
delegate_to=self.delegate_to,
|
334
303
|
impersonation_chain=self.impersonation_chain,
|
335
304
|
)
|
336
305
|
|
@@ -944,9 +913,6 @@ class GCSSynchronizeBucketsOperator(GoogleCloudBaseOperator):
|
|
944
913
|
This option can delete data quickly if you specify the wrong source/destination combination.
|
945
914
|
|
946
915
|
:param gcp_conn_id: (Optional) The connection ID used to connect to Google Cloud.
|
947
|
-
:param delegate_to: The account to impersonate using domain-wide delegation of authority,
|
948
|
-
if any. For this to work, the service account making the request must have
|
949
|
-
domain-wide delegation enabled.
|
950
916
|
:param impersonation_chain: Optional service account to impersonate using short-term
|
951
917
|
credentials, or chained list of accounts required to get the access_token
|
952
918
|
of the last account in the list, which will be impersonated in the request.
|
@@ -966,7 +932,6 @@ class GCSSynchronizeBucketsOperator(GoogleCloudBaseOperator):
|
|
966
932
|
"delete_extra_files",
|
967
933
|
"allow_overwrite",
|
968
934
|
"gcp_conn_id",
|
969
|
-
"delegate_to",
|
970
935
|
"impersonation_chain",
|
971
936
|
)
|
972
937
|
operator_extra_links = (StorageLink(),)
|
@@ -982,7 +947,6 @@ class GCSSynchronizeBucketsOperator(GoogleCloudBaseOperator):
|
|
982
947
|
delete_extra_files: bool = False,
|
983
948
|
allow_overwrite: bool = False,
|
984
949
|
gcp_conn_id: str = "google_cloud_default",
|
985
|
-
delegate_to: str | None = None,
|
986
950
|
impersonation_chain: str | Sequence[str] | None = None,
|
987
951
|
**kwargs,
|
988
952
|
) -> None:
|
@@ -995,17 +959,11 @@ class GCSSynchronizeBucketsOperator(GoogleCloudBaseOperator):
|
|
995
959
|
self.delete_extra_files = delete_extra_files
|
996
960
|
self.allow_overwrite = allow_overwrite
|
997
961
|
self.gcp_conn_id = gcp_conn_id
|
998
|
-
if delegate_to:
|
999
|
-
warnings.warn(
|
1000
|
-
"'delegate_to' parameter is deprecated, please use 'impersonation_chain'", DeprecationWarning
|
1001
|
-
)
|
1002
|
-
self.delegate_to = delegate_to
|
1003
962
|
self.impersonation_chain = impersonation_chain
|
1004
963
|
|
1005
964
|
def execute(self, context: Context) -> None:
|
1006
965
|
hook = GCSHook(
|
1007
966
|
gcp_conn_id=self.gcp_conn_id,
|
1008
|
-
delegate_to=self.delegate_to,
|
1009
967
|
impersonation_chain=self.impersonation_chain,
|
1010
968
|
)
|
1011
969
|
StorageLink.persist(
|