apache-airflow-providers-google 10.26.0rc1__py3-none-any.whl → 11.0.0__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.
Files changed (205) hide show
  1. airflow/providers/google/__init__.py +1 -1
  2. airflow/providers/google/ads/hooks/ads.py +2 -1
  3. airflow/providers/google/ads/operators/ads.py +2 -1
  4. airflow/providers/google/ads/transfers/ads_to_gcs.py +2 -1
  5. airflow/providers/google/assets/gcs.py +17 -1
  6. airflow/providers/google/cloud/hooks/automl.py +3 -6
  7. airflow/providers/google/cloud/hooks/bigquery.py +41 -1486
  8. airflow/providers/google/cloud/hooks/bigquery_dts.py +4 -11
  9. airflow/providers/google/cloud/hooks/bigtable.py +3 -6
  10. airflow/providers/google/cloud/hooks/cloud_batch.py +6 -3
  11. airflow/providers/google/cloud/hooks/cloud_build.py +3 -15
  12. airflow/providers/google/cloud/hooks/cloud_composer.py +2 -17
  13. airflow/providers/google/cloud/hooks/cloud_memorystore.py +5 -6
  14. airflow/providers/google/cloud/hooks/cloud_run.py +10 -5
  15. airflow/providers/google/cloud/hooks/cloud_sql.py +5 -7
  16. airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +3 -7
  17. airflow/providers/google/cloud/hooks/compute.py +3 -6
  18. airflow/providers/google/cloud/hooks/compute_ssh.py +0 -5
  19. airflow/providers/google/cloud/hooks/datacatalog.py +3 -6
  20. airflow/providers/google/cloud/hooks/dataflow.py +3 -14
  21. airflow/providers/google/cloud/hooks/dataform.py +2 -9
  22. airflow/providers/google/cloud/hooks/datafusion.py +4 -15
  23. airflow/providers/google/cloud/hooks/dataplex.py +4 -7
  24. airflow/providers/google/cloud/hooks/dataprep.py +2 -2
  25. airflow/providers/google/cloud/hooks/dataproc.py +77 -22
  26. airflow/providers/google/cloud/hooks/dataproc_metastore.py +2 -9
  27. airflow/providers/google/cloud/hooks/datastore.py +3 -6
  28. airflow/providers/google/cloud/hooks/dlp.py +3 -6
  29. airflow/providers/google/cloud/hooks/functions.py +2 -6
  30. airflow/providers/google/cloud/hooks/gcs.py +2 -18
  31. airflow/providers/google/cloud/hooks/gdm.py +1 -17
  32. airflow/providers/google/cloud/hooks/kms.py +3 -6
  33. airflow/providers/google/cloud/hooks/kubernetes_engine.py +7 -97
  34. airflow/providers/google/cloud/hooks/life_sciences.py +2 -6
  35. airflow/providers/google/cloud/hooks/looker.py +2 -1
  36. airflow/providers/google/cloud/hooks/mlengine.py +0 -8
  37. airflow/providers/google/cloud/hooks/natural_language.py +3 -6
  38. airflow/providers/google/cloud/hooks/os_login.py +3 -6
  39. airflow/providers/google/cloud/hooks/pubsub.py +3 -6
  40. airflow/providers/google/cloud/hooks/secret_manager.py +3 -73
  41. airflow/providers/google/cloud/hooks/spanner.py +3 -6
  42. airflow/providers/google/cloud/hooks/speech_to_text.py +3 -6
  43. airflow/providers/google/cloud/hooks/stackdriver.py +3 -6
  44. airflow/providers/google/cloud/hooks/tasks.py +3 -6
  45. airflow/providers/google/cloud/hooks/text_to_speech.py +3 -6
  46. airflow/providers/google/cloud/hooks/translate.py +455 -9
  47. airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +3 -6
  48. airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +3 -6
  49. airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +3 -6
  50. airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +2 -9
  51. airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +2 -9
  52. airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +1 -14
  53. airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +3 -6
  54. airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +2 -9
  55. airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py +3 -1
  56. airflow/providers/google/cloud/hooks/vertex_ai/prediction_service.py +2 -1
  57. airflow/providers/google/cloud/hooks/video_intelligence.py +3 -6
  58. airflow/providers/google/cloud/hooks/vision.py +3 -6
  59. airflow/providers/google/cloud/hooks/workflows.py +2 -9
  60. airflow/providers/google/cloud/links/dataproc.py +0 -1
  61. airflow/providers/google/cloud/links/translate.py +91 -0
  62. airflow/providers/google/cloud/log/gcs_task_handler.py +2 -1
  63. airflow/providers/google/cloud/log/stackdriver_task_handler.py +11 -3
  64. airflow/providers/google/cloud/openlineage/utils.py +54 -21
  65. airflow/providers/google/cloud/operators/automl.py +5 -4
  66. airflow/providers/google/cloud/operators/bigquery.py +2 -341
  67. airflow/providers/google/cloud/operators/bigquery_dts.py +2 -1
  68. airflow/providers/google/cloud/operators/bigtable.py +2 -1
  69. airflow/providers/google/cloud/operators/cloud_batch.py +2 -1
  70. airflow/providers/google/cloud/operators/cloud_build.py +2 -1
  71. airflow/providers/google/cloud/operators/cloud_composer.py +2 -1
  72. airflow/providers/google/cloud/operators/cloud_memorystore.py +2 -1
  73. airflow/providers/google/cloud/operators/cloud_run.py +2 -1
  74. airflow/providers/google/cloud/operators/cloud_sql.py +2 -1
  75. airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +2 -1
  76. airflow/providers/google/cloud/operators/compute.py +2 -1
  77. airflow/providers/google/cloud/operators/datacatalog.py +2 -1
  78. airflow/providers/google/cloud/operators/dataflow.py +2 -517
  79. airflow/providers/google/cloud/operators/dataform.py +2 -1
  80. airflow/providers/google/cloud/operators/datafusion.py +2 -1
  81. airflow/providers/google/cloud/operators/dataplex.py +37 -31
  82. airflow/providers/google/cloud/operators/dataprep.py +2 -1
  83. airflow/providers/google/cloud/operators/dataproc.py +3 -633
  84. airflow/providers/google/cloud/operators/dataproc_metastore.py +2 -1
  85. airflow/providers/google/cloud/operators/datastore.py +2 -1
  86. airflow/providers/google/cloud/operators/dlp.py +2 -1
  87. airflow/providers/google/cloud/operators/functions.py +2 -1
  88. airflow/providers/google/cloud/operators/gcs.py +5 -4
  89. airflow/providers/google/cloud/operators/kubernetes_engine.py +2 -11
  90. airflow/providers/google/cloud/operators/life_sciences.py +2 -1
  91. airflow/providers/google/cloud/operators/mlengine.py +2 -1
  92. airflow/providers/google/cloud/operators/natural_language.py +3 -2
  93. airflow/providers/google/cloud/operators/pubsub.py +2 -1
  94. airflow/providers/google/cloud/operators/spanner.py +2 -1
  95. airflow/providers/google/cloud/operators/speech_to_text.py +2 -1
  96. airflow/providers/google/cloud/operators/stackdriver.py +2 -1
  97. airflow/providers/google/cloud/operators/tasks.py +3 -2
  98. airflow/providers/google/cloud/operators/text_to_speech.py +2 -1
  99. airflow/providers/google/cloud/operators/translate.py +622 -32
  100. airflow/providers/google/cloud/operators/translate_speech.py +2 -1
  101. airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +2 -93
  102. airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +3 -13
  103. airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +2 -17
  104. airflow/providers/google/cloud/operators/vertex_ai/dataset.py +2 -1
  105. airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +2 -1
  106. airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +2 -1
  107. airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +3 -13
  108. airflow/providers/google/cloud/operators/vertex_ai/model_service.py +2 -1
  109. airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +2 -1
  110. airflow/providers/google/cloud/operators/video_intelligence.py +2 -1
  111. airflow/providers/google/cloud/operators/vision.py +3 -2
  112. airflow/providers/google/cloud/operators/workflows.py +3 -2
  113. airflow/providers/google/cloud/secrets/secret_manager.py +2 -19
  114. airflow/providers/google/cloud/sensors/bigquery.py +2 -81
  115. airflow/providers/google/cloud/sensors/bigquery_dts.py +2 -1
  116. airflow/providers/google/cloud/sensors/bigtable.py +2 -1
  117. airflow/providers/google/cloud/sensors/cloud_composer.py +8 -94
  118. airflow/providers/google/cloud/sensors/cloud_storage_transfer_service.py +2 -1
  119. airflow/providers/google/cloud/sensors/dataflow.py +2 -1
  120. airflow/providers/google/cloud/sensors/dataform.py +2 -1
  121. airflow/providers/google/cloud/sensors/datafusion.py +2 -1
  122. airflow/providers/google/cloud/sensors/dataplex.py +2 -1
  123. airflow/providers/google/cloud/sensors/dataprep.py +2 -1
  124. airflow/providers/google/cloud/sensors/dataproc.py +2 -1
  125. airflow/providers/google/cloud/sensors/dataproc_metastore.py +2 -1
  126. airflow/providers/google/cloud/sensors/gcs.py +4 -36
  127. airflow/providers/google/cloud/sensors/pubsub.py +2 -1
  128. airflow/providers/google/cloud/sensors/tasks.py +2 -1
  129. airflow/providers/google/cloud/sensors/workflows.py +2 -1
  130. airflow/providers/google/cloud/transfers/adls_to_gcs.py +2 -1
  131. airflow/providers/google/cloud/transfers/azure_blob_to_gcs.py +2 -1
  132. airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +2 -1
  133. airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +75 -18
  134. airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +9 -7
  135. airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +2 -1
  136. airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +1 -1
  137. airflow/providers/google/cloud/transfers/bigquery_to_sql.py +2 -1
  138. airflow/providers/google/cloud/transfers/calendar_to_gcs.py +2 -1
  139. airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +2 -1
  140. airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +2 -1
  141. airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +13 -9
  142. airflow/providers/google/cloud/transfers/gcs_to_gcs.py +2 -1
  143. airflow/providers/google/cloud/transfers/gcs_to_local.py +2 -1
  144. airflow/providers/google/cloud/transfers/gcs_to_sftp.py +2 -1
  145. airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +2 -1
  146. airflow/providers/google/cloud/transfers/gdrive_to_local.py +2 -1
  147. airflow/providers/google/cloud/transfers/local_to_gcs.py +2 -1
  148. airflow/providers/google/cloud/transfers/mssql_to_gcs.py +1 -1
  149. airflow/providers/google/cloud/transfers/s3_to_gcs.py +2 -1
  150. airflow/providers/google/cloud/transfers/salesforce_to_gcs.py +2 -1
  151. airflow/providers/google/cloud/transfers/sftp_to_gcs.py +2 -1
  152. airflow/providers/google/cloud/transfers/sheets_to_gcs.py +2 -1
  153. airflow/providers/google/cloud/transfers/sql_to_gcs.py +2 -1
  154. airflow/providers/google/cloud/triggers/bigquery.py +2 -1
  155. airflow/providers/google/cloud/triggers/bigquery_dts.py +2 -1
  156. airflow/providers/google/cloud/triggers/cloud_batch.py +2 -1
  157. airflow/providers/google/cloud/triggers/cloud_build.py +2 -1
  158. airflow/providers/google/cloud/triggers/cloud_composer.py +3 -2
  159. airflow/providers/google/cloud/triggers/cloud_run.py +2 -1
  160. airflow/providers/google/cloud/triggers/cloud_sql.py +1 -1
  161. airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py +2 -1
  162. airflow/providers/google/cloud/triggers/dataflow.py +2 -1
  163. airflow/providers/google/cloud/triggers/datafusion.py +2 -1
  164. airflow/providers/google/cloud/triggers/dataplex.py +1 -1
  165. airflow/providers/google/cloud/triggers/dataproc.py +2 -1
  166. airflow/providers/google/cloud/triggers/gcs.py +3 -2
  167. airflow/providers/google/cloud/triggers/kubernetes_engine.py +2 -1
  168. airflow/providers/google/cloud/triggers/mlengine.py +2 -1
  169. airflow/providers/google/cloud/triggers/pubsub.py +2 -1
  170. airflow/providers/google/cloud/triggers/vertex_ai.py +2 -1
  171. airflow/providers/google/cloud/utils/credentials_provider.py +1 -1
  172. airflow/providers/google/cloud/utils/dataform.py +1 -1
  173. airflow/providers/google/cloud/utils/field_validator.py +2 -1
  174. airflow/providers/google/cloud/utils/mlengine_operator_utils.py +2 -1
  175. airflow/providers/google/common/hooks/base_google.py +4 -11
  176. airflow/providers/google/common/hooks/discovery_api.py +1 -6
  177. airflow/providers/google/firebase/hooks/firestore.py +1 -1
  178. airflow/providers/google/firebase/operators/firestore.py +2 -1
  179. airflow/providers/google/get_provider_info.py +7 -22
  180. airflow/providers/google/marketing_platform/hooks/analytics_admin.py +2 -1
  181. airflow/providers/google/marketing_platform/hooks/campaign_manager.py +2 -3
  182. airflow/providers/google/marketing_platform/hooks/display_video.py +4 -3
  183. airflow/providers/google/marketing_platform/hooks/search_ads.py +6 -6
  184. airflow/providers/google/marketing_platform/operators/analytics_admin.py +2 -1
  185. airflow/providers/google/marketing_platform/operators/campaign_manager.py +2 -42
  186. airflow/providers/google/marketing_platform/operators/display_video.py +2 -47
  187. airflow/providers/google/marketing_platform/operators/search_ads.py +2 -1
  188. airflow/providers/google/marketing_platform/sensors/campaign_manager.py +2 -7
  189. airflow/providers/google/marketing_platform/sensors/display_video.py +2 -13
  190. airflow/providers/google/suite/hooks/calendar.py +2 -8
  191. airflow/providers/google/suite/hooks/drive.py +2 -6
  192. airflow/providers/google/suite/hooks/sheets.py +2 -7
  193. airflow/providers/google/suite/operators/sheets.py +2 -7
  194. airflow/providers/google/suite/sensors/drive.py +2 -7
  195. airflow/providers/google/suite/transfers/gcs_to_gdrive.py +2 -7
  196. airflow/providers/google/suite/transfers/gcs_to_sheets.py +2 -7
  197. airflow/providers/google/suite/transfers/local_to_drive.py +2 -7
  198. airflow/providers/google/suite/transfers/sql_to_sheets.py +2 -7
  199. {apache_airflow_providers_google-10.26.0rc1.dist-info → apache_airflow_providers_google-11.0.0.dist-info}/METADATA +17 -17
  200. apache_airflow_providers_google-11.0.0.dist-info/RECORD +315 -0
  201. airflow/providers/google/marketing_platform/hooks/analytics.py +0 -211
  202. airflow/providers/google/marketing_platform/operators/analytics.py +0 -551
  203. apache_airflow_providers_google-10.26.0rc1.dist-info/RECORD +0 -317
  204. {apache_airflow_providers_google-10.26.0rc1.dist-info → apache_airflow_providers_google-11.0.0.dist-info}/WHEEL +0 -0
  205. {apache_airflow_providers_google-10.26.0rc1.dist-info → apache_airflow_providers_google-11.0.0.dist-info}/entry_points.txt +0 -0
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  from google.protobuf.json_format import MessageToDict
25
26
 
@@ -20,7 +20,8 @@
20
20
 
21
21
  from __future__ import annotations
22
22
 
23
- from typing import TYPE_CHECKING, Sequence
23
+ from collections.abc import Sequence
24
+ from typing import TYPE_CHECKING
24
25
 
25
26
  from google.api_core.exceptions import NotFound
26
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -464,98 +465,6 @@ class CreateAutoMLTabularTrainingJobOperator(AutoMLTrainingJobBaseOperator):
464
465
  return result
465
466
 
466
467
 
467
- @deprecated(
468
- planned_removal_date="September 15, 2024",
469
- use_instead="SupervisedFineTuningTrainOperator",
470
- instructions=(
471
- "Please consider using Fine Tuning over the Gemini model. "
472
- "More info: https://cloud.google.com/vertex-ai/docs/start/automl-gemini-comparison"
473
- ),
474
- category=AirflowProviderDeprecationWarning,
475
- )
476
- class CreateAutoMLTextTrainingJobOperator(AutoMLTrainingJobBaseOperator):
477
- """
478
- Create Auto ML Text Training job.
479
-
480
- WARNING: Text creation API is deprecated since September 15, 2024
481
- (https://cloud.google.com/vertex-ai/docs/tutorials/text-classification-automl/overview).
482
- """
483
-
484
- template_fields = [
485
- "parent_model",
486
- "dataset_id",
487
- "region",
488
- "impersonation_chain",
489
- ]
490
- operator_extra_links = (VertexAIModelLink(), VertexAITrainingLink())
491
-
492
- def __init__(
493
- self,
494
- *,
495
- dataset_id: str,
496
- prediction_type: str,
497
- multi_label: bool = False,
498
- sentiment_max: int = 10,
499
- validation_fraction_split: float | None = None,
500
- training_filter_split: str | None = None,
501
- validation_filter_split: str | None = None,
502
- test_filter_split: str | None = None,
503
- **kwargs,
504
- ) -> None:
505
- super().__init__(**kwargs)
506
- self.dataset_id = dataset_id
507
- self.prediction_type = prediction_type
508
- self.multi_label = multi_label
509
- self.sentiment_max = sentiment_max
510
- self.validation_fraction_split = validation_fraction_split
511
- self.training_filter_split = training_filter_split
512
- self.validation_filter_split = validation_filter_split
513
- self.test_filter_split = test_filter_split
514
-
515
- def execute(self, context: Context):
516
- self.hook = AutoMLHook(
517
- gcp_conn_id=self.gcp_conn_id,
518
- impersonation_chain=self.impersonation_chain,
519
- )
520
- self.parent_model = self.parent_model.split("@")[0] if self.parent_model else None
521
- model, training_id = self.hook.create_auto_ml_text_training_job(
522
- project_id=self.project_id,
523
- region=self.region,
524
- display_name=self.display_name,
525
- dataset=datasets.TextDataset(dataset_name=self.dataset_id),
526
- prediction_type=self.prediction_type,
527
- multi_label=self.multi_label,
528
- sentiment_max=self.sentiment_max,
529
- labels=self.labels,
530
- training_encryption_spec_key_name=self.training_encryption_spec_key_name,
531
- model_encryption_spec_key_name=self.model_encryption_spec_key_name,
532
- training_fraction_split=self.training_fraction_split,
533
- validation_fraction_split=self.validation_fraction_split,
534
- test_fraction_split=self.test_fraction_split,
535
- training_filter_split=self.training_filter_split,
536
- validation_filter_split=self.validation_filter_split,
537
- test_filter_split=self.test_filter_split,
538
- model_display_name=self.model_display_name,
539
- model_labels=self.model_labels,
540
- sync=self.sync,
541
- parent_model=self.parent_model,
542
- is_default_version=self.is_default_version,
543
- model_version_aliases=self.model_version_aliases,
544
- model_version_description=self.model_version_description,
545
- )
546
-
547
- if model:
548
- result = Model.to_dict(model)
549
- model_id = self.hook.extract_model_id(result)
550
- self.xcom_push(context, key="model_id", value=model_id)
551
- VertexAIModelLink.persist(context=context, task_instance=self, model_id=model_id)
552
- else:
553
- result = model # type: ignore
554
- self.xcom_push(context, key="training_id", value=training_id)
555
- VertexAITrainingLink.persist(context=context, task_instance=self, training_id=training_id)
556
- return result
557
-
558
-
559
468
  class CreateAutoMLVideoTrainingJobOperator(AutoMLTrainingJobBaseOperator):
560
469
  """Create Auto ML Video Training job."""
561
470
 
@@ -20,16 +20,16 @@
20
20
 
21
21
  from __future__ import annotations
22
22
 
23
- import warnings
23
+ from collections.abc import Sequence
24
24
  from functools import cached_property
25
- from typing import TYPE_CHECKING, Any, Sequence
25
+ from typing import TYPE_CHECKING, Any
26
26
 
27
27
  from google.api_core.exceptions import NotFound
28
28
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
29
29
  from google.cloud.aiplatform_v1.types import BatchPredictionJob
30
30
 
31
31
  from airflow.configuration import conf
32
- from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
32
+ from airflow.exceptions import AirflowException
33
33
  from airflow.providers.google.cloud.hooks.vertex_ai.batch_prediction_job import BatchPredictionJobHook
34
34
  from airflow.providers.google.cloud.links.vertex_ai import (
35
35
  VertexAIBatchPredictionJobLink,
@@ -136,9 +136,6 @@ class CreateBatchPredictionJobOperator(GoogleCloudBaseOperator):
136
136
  If this is set, then all resources created by the BatchPredictionJob will be encrypted with the
137
137
  provided encryption key.
138
138
  Overrides encryption_spec_key_name set in aiplatform.init.
139
- :param sync: (Deprecated) Whether to execute this method synchronously. If False, this method will be executed in
140
- concurrent Future and any downstream object will be immediately returned and synced when the
141
- Future has completed.
142
139
  :param create_request_timeout: Optional. The timeout for the create request in seconds.
143
140
  :param batch_size: Optional. The number of the records (e.g. instances)
144
141
  of the operation given in each batch
@@ -190,7 +187,6 @@ class CreateBatchPredictionJobOperator(GoogleCloudBaseOperator):
190
187
  explanation_parameters: explain.ExplanationParameters | None = None,
191
188
  labels: dict[str, str] | None = None,
192
189
  encryption_spec_key_name: str | None = None,
193
- sync: bool = True,
194
190
  create_request_timeout: float | None = None,
195
191
  batch_size: int | None = None,
196
192
  gcp_conn_id: str = "google_cloud_default",
@@ -221,7 +217,6 @@ class CreateBatchPredictionJobOperator(GoogleCloudBaseOperator):
221
217
  self.explanation_parameters = explanation_parameters
222
218
  self.labels = labels
223
219
  self.encryption_spec_key_name = encryption_spec_key_name
224
- self.sync = sync
225
220
  self.create_request_timeout = create_request_timeout
226
221
  self.batch_size = batch_size
227
222
  self.gcp_conn_id = gcp_conn_id
@@ -237,11 +232,6 @@ class CreateBatchPredictionJobOperator(GoogleCloudBaseOperator):
237
232
  )
238
233
 
239
234
  def execute(self, context: Context):
240
- warnings.warn(
241
- "The 'sync' parameter is deprecated and will be removed after 28.08.2024.",
242
- AirflowProviderDeprecationWarning,
243
- stacklevel=2,
244
- )
245
235
  self.log.info("Creating Batch prediction job")
246
236
  batch_prediction_job: BatchPredictionJobObject = self.hook.submit_batch_prediction_job(
247
237
  region=self.region,
@@ -19,9 +19,9 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- import warnings
22
+ from collections.abc import Sequence
23
23
  from functools import cached_property
24
- from typing import TYPE_CHECKING, Any, Sequence
24
+ from typing import TYPE_CHECKING, Any
25
25
 
26
26
  from google.api_core.exceptions import NotFound
27
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -111,7 +111,6 @@ class CustomTrainingJobBaseOperator(GoogleCloudBaseOperator):
111
111
  predefined_split_column_name: str | None = None,
112
112
  timestamp_split_column_name: str | None = None,
113
113
  tensorboard: str | None = None,
114
- sync=True,
115
114
  gcp_conn_id: str = "google_cloud_default",
116
115
  impersonation_chain: str | Sequence[str] | None = None,
117
116
  **kwargs,
@@ -168,18 +167,10 @@ class CustomTrainingJobBaseOperator(GoogleCloudBaseOperator):
168
167
  self.predefined_split_column_name = predefined_split_column_name
169
168
  self.timestamp_split_column_name = timestamp_split_column_name
170
169
  self.tensorboard = tensorboard
171
- self.sync = sync
172
170
  # END Run param
173
171
  self.gcp_conn_id = gcp_conn_id
174
172
  self.impersonation_chain = impersonation_chain
175
173
 
176
- def execute(self, context: Context) -> None:
177
- warnings.warn(
178
- "The 'sync' parameter is deprecated and will be removed after 01.10.2024.",
179
- AirflowProviderDeprecationWarning,
180
- stacklevel=2,
181
- )
182
-
183
174
  def execute_complete(self, context: Context, event: dict[str, Any]) -> dict[str, Any] | None:
184
175
  if event["status"] == "error":
185
176
  raise AirflowException(event["message"])
@@ -532,8 +523,6 @@ class CreateCustomContainerTrainingJobOperator(CustomTrainingJobBaseOperator):
532
523
  self.poll_interval = poll_interval
533
524
 
534
525
  def execute(self, context: Context):
535
- super().execute(context)
536
-
537
526
  self.parent_model = self.parent_model.split("@")[0] if self.parent_model else None
538
527
 
539
528
  if self.deferrable:
@@ -990,8 +979,6 @@ class CreateCustomPythonPackageTrainingJobOperator(CustomTrainingJobBaseOperator
990
979
  self.poll_interval = poll_interval
991
980
 
992
981
  def execute(self, context: Context):
993
- super().execute(context)
994
-
995
982
  self.parent_model = self.parent_model.split("@")[0] if self.parent_model else None
996
983
 
997
984
  if self.deferrable:
@@ -1455,8 +1442,6 @@ class CreateCustomTrainingJobOperator(CustomTrainingJobBaseOperator):
1455
1442
  self.poll_interval = poll_interval
1456
1443
 
1457
1444
  def execute(self, context: Context):
1458
- super().execute(context)
1459
-
1460
1445
  self.parent_model = self.parent_model.split("@")[0] if self.parent_model else None
1461
1446
 
1462
1447
  if self.deferrable:
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  from google.api_core.exceptions import NotFound
25
26
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -20,7 +20,8 @@
20
20
 
21
21
  from __future__ import annotations
22
22
 
23
- from typing import TYPE_CHECKING, Sequence
23
+ from collections.abc import Sequence
24
+ from typing import TYPE_CHECKING
24
25
 
25
26
  from google.api_core.exceptions import NotFound
26
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  from airflow.exceptions import AirflowProviderDeprecationWarning
25
26
  from airflow.providers.google.cloud.hooks.vertex_ai.generative_model import GenerativeModelHook
@@ -20,15 +20,15 @@
20
20
 
21
21
  from __future__ import annotations
22
22
 
23
- import warnings
24
- from typing import TYPE_CHECKING, Any, Sequence
23
+ from collections.abc import Sequence
24
+ from typing import TYPE_CHECKING, Any
25
25
 
26
26
  from google.api_core.exceptions import NotFound
27
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
28
28
  from google.cloud.aiplatform_v1 import types
29
29
 
30
30
  from airflow.configuration import conf
31
- from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
31
+ from airflow.exceptions import AirflowException
32
32
  from airflow.providers.google.cloud.hooks.vertex_ai.hyperparameter_tuning_job import (
33
33
  HyperparameterTuningJobHook,
34
34
  )
@@ -128,8 +128,6 @@ class CreateHyperparameterTuningJobOperator(GoogleCloudBaseOperator):
128
128
  `service_account` is required with provided `tensorboard`. For more information on configuring
129
129
  your service account please visit:
130
130
  https://cloud.google.com/vertex-ai/docs/experiments/tensorboard-training
131
- :param sync: (Deprecated) Whether to execute this method synchronously. If False, this method will
132
- unblock, and it will be executed in a concurrent Future.
133
131
  :param gcp_conn_id: The connection ID to use connecting to Google Cloud.
134
132
  :param impersonation_chain: Optional service account to impersonate using short-term
135
133
  credentials, or chained list of accounts required to get the access_token
@@ -180,7 +178,6 @@ class CreateHyperparameterTuningJobOperator(GoogleCloudBaseOperator):
180
178
  restart_job_on_worker_restart: bool = False,
181
179
  enable_web_access: bool = False,
182
180
  tensorboard: str | None = None,
183
- sync: bool = True,
184
181
  # END: run param
185
182
  gcp_conn_id: str = "google_cloud_default",
186
183
  impersonation_chain: str | Sequence[str] | None = None,
@@ -214,7 +211,6 @@ class CreateHyperparameterTuningJobOperator(GoogleCloudBaseOperator):
214
211
  self.restart_job_on_worker_restart = restart_job_on_worker_restart
215
212
  self.enable_web_access = enable_web_access
216
213
  self.tensorboard = tensorboard
217
- self.sync = sync
218
214
  self.gcp_conn_id = gcp_conn_id
219
215
  self.impersonation_chain = impersonation_chain
220
216
  self.hook: HyperparameterTuningJobHook | None = None
@@ -222,12 +218,6 @@ class CreateHyperparameterTuningJobOperator(GoogleCloudBaseOperator):
222
218
  self.poll_interval = poll_interval
223
219
 
224
220
  def execute(self, context: Context):
225
- warnings.warn(
226
- "The 'sync' parameter is deprecated and will be removed after 01.09.2024.",
227
- AirflowProviderDeprecationWarning,
228
- stacklevel=2,
229
- )
230
-
231
221
  self.log.info("Creating Hyperparameter Tuning job")
232
222
  self.hook = HyperparameterTuningJobHook(
233
223
  gcp_conn_id=self.gcp_conn_id,
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  from google.api_core.exceptions import NotFound
25
26
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -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, Sequence
24
+ from typing import TYPE_CHECKING, Any
24
25
 
25
26
  from google.api_core.exceptions import NotFound
26
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
25
26
  from google.cloud.videointelligence_v1 import Feature, VideoContext
@@ -19,8 +19,9 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
+ from collections.abc import Sequence
22
23
  from copy import deepcopy
23
- from typing import TYPE_CHECKING, Any, Sequence, Tuple
24
+ from typing import TYPE_CHECKING, Any
24
25
 
25
26
  from google.api_core.exceptions import AlreadyExists
26
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -43,7 +44,7 @@ if TYPE_CHECKING:
43
44
  from airflow.utils.context import Context
44
45
 
45
46
 
46
- MetaData = Sequence[Tuple[str, str]]
47
+ MetaData = Sequence[tuple[str, str]]
47
48
 
48
49
 
49
50
  class CloudVisionCreateProductSetOperator(GoogleCloudBaseOperator):
@@ -20,7 +20,8 @@ import datetime
20
20
  import json
21
21
  import re
22
22
  import uuid
23
- from typing import TYPE_CHECKING, Sequence
23
+ from collections.abc import Sequence
24
+ from typing import TYPE_CHECKING
24
25
 
25
26
  from google.api_core.exceptions import AlreadyExists
26
27
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
@@ -113,7 +114,7 @@ class WorkflowsCreateWorkflowOperator(GoogleCloudBaseOperator):
113
114
 
114
115
  # We are limited by allowed length of workflow_id so
115
116
  # we use hash of whole information
116
- exec_date = context["execution_date"].isoformat()
117
+ exec_date = context["logical_date"].isoformat()
117
118
  base = f"airflow_{self.dag_id}_{self.task_id}_{exec_date}_{hash_base}"
118
119
  workflow_id = md5(base.encode()).hexdigest()
119
120
  return re.sub(r"[:\-+.]", "_", workflow_id)
@@ -19,17 +19,16 @@
19
19
  from __future__ import annotations
20
20
 
21
21
  import logging
22
- from typing import Sequence
22
+ from collections.abc import Sequence
23
23
 
24
24
  from google.auth.exceptions import DefaultCredentialsError
25
25
 
26
- from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
26
+ from airflow.exceptions import AirflowException
27
27
  from airflow.providers.google.cloud._internal_client.secret_manager_client import _SecretManagerClient
28
28
  from airflow.providers.google.cloud.utils.credentials_provider import (
29
29
  _get_target_principal_and_delegates,
30
30
  get_credentials_and_project_id,
31
31
  )
32
- from airflow.providers.google.common.deprecated import deprecated
33
32
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
34
33
  from airflow.secrets import BaseSecretsBackend
35
34
  from airflow.utils.log.logging_mixin import LoggingMixin
@@ -161,22 +160,6 @@ class CloudSecretManagerBackend(BaseSecretsBackend, LoggingMixin):
161
160
 
162
161
  return self._get_secret(self.connections_prefix, conn_id)
163
162
 
164
- @deprecated(
165
- planned_removal_date="November 01, 2024",
166
- use_instead="get_conn_value",
167
- category=AirflowProviderDeprecationWarning,
168
- )
169
- def get_conn_uri(self, conn_id: str) -> str | None:
170
- """
171
- Return URI representation of Connection conn_id.
172
-
173
- As of Airflow version 2.3.0 this method is deprecated.
174
-
175
- :param conn_id: the connection id
176
- :return: deserialized Connection
177
- """
178
- return self.get_conn_value(conn_id)
179
-
180
163
  def get_variable(self, key: str) -> str | None:
181
164
  """
182
165
  Get Airflow Variable from Environment Variable.
@@ -20,8 +20,9 @@
20
20
  from __future__ import annotations
21
21
 
22
22
  import warnings
23
+ from collections.abc import Sequence
23
24
  from datetime import timedelta
24
- from typing import TYPE_CHECKING, Any, Sequence
25
+ from typing import TYPE_CHECKING, Any
25
26
 
26
27
  from airflow.configuration import conf
27
28
  from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
@@ -30,7 +31,6 @@ from airflow.providers.google.cloud.triggers.bigquery import (
30
31
  BigQueryTableExistenceTrigger,
31
32
  BigQueryTablePartitionExistenceTrigger,
32
33
  )
33
- from airflow.providers.google.common.deprecated import deprecated
34
34
  from airflow.sensors.base import BaseSensorOperator
35
35
 
36
36
  if TYPE_CHECKING:
@@ -257,82 +257,3 @@ class BigQueryTablePartitionExistenceSensor(BaseSensorOperator):
257
257
 
258
258
  message = "No event received in trigger callback"
259
259
  raise AirflowException(message)
260
-
261
-
262
- @deprecated(
263
- planned_removal_date="November 01, 2024",
264
- use_instead="BigQueryTableExistenceSensor",
265
- instructions="Please use BigQueryTableExistenceSensor and set deferrable attribute to True.",
266
- category=AirflowProviderDeprecationWarning,
267
- )
268
- class BigQueryTableExistenceAsyncSensor(BigQueryTableExistenceSensor):
269
- """
270
- Checks for the existence of a table in Google Big Query.
271
-
272
- This class is deprecated and will be removed in a future release.
273
-
274
- Please use :class:`airflow.providers.google.cloud.sensors.bigquery.BigQueryTableExistenceSensor`
275
- and set *deferrable* attribute to *True* instead.
276
-
277
- :param project_id: The Google cloud project in which to look for the table.
278
- The connection supplied to the hook must provide
279
- access to the specified project.
280
- :param dataset_id: The name of the dataset in which to look for the table.
281
- storage bucket.
282
- :param table_id: The name of the table to check the existence of.
283
- :param gcp_conn_id: The connection ID used to connect to Google Cloud.
284
- :param bigquery_conn_id: (Deprecated) The connection ID used to connect to Google Cloud.
285
- This parameter has been deprecated. You should pass the gcp_conn_id parameter instead.
286
- :param impersonation_chain: Optional service account to impersonate using short-term
287
- credentials, or chained list of accounts required to get the access_token
288
- of the last account in the list, which will be impersonated in the request.
289
- If set as a string, the account must grant the originating account
290
- the Service Account Token Creator IAM role.
291
- If set as a sequence, the identities from the list must grant
292
- Service Account Token Creator IAM role to the directly preceding identity, with first
293
- account from the list granting this role to the originating account (templated).
294
- :param polling_interval: The interval in seconds to wait between checks table existence.
295
- """
296
-
297
- def __init__(self, **kwargs):
298
- super().__init__(deferrable=True, **kwargs)
299
-
300
-
301
- @deprecated(
302
- planned_removal_date="November 01, 2024",
303
- use_instead="BigQueryTablePartitionExistenceSensor",
304
- instructions="Please use BigQueryTablePartitionExistenceSensor and set deferrable attribute to True.",
305
- category=AirflowProviderDeprecationWarning,
306
- )
307
- class BigQueryTableExistencePartitionAsyncSensor(BigQueryTablePartitionExistenceSensor):
308
- """
309
- Checks for the existence of a partition within a table in Google BigQuery.
310
-
311
- This class is deprecated and will be removed in a future release.
312
-
313
- Please use :class:`airflow.providers.google.cloud.sensors.bigquery.BigQueryTablePartitionExistenceSensor`
314
- and set *deferrable* attribute to *True* instead.
315
-
316
- :param project_id: The Google cloud project in which to look for the table.
317
- The connection supplied to the hook must provide
318
- access to the specified project.
319
- :param dataset_id: The name of the dataset in which to look for the table.
320
- storage bucket.
321
- :param partition_id: The name of the partition to check the existence of.
322
- :param table_id: The name of the table to check the existence of.
323
- :param gcp_conn_id: The connection ID used to connect to Google Cloud.
324
- :param bigquery_conn_id: (Deprecated) The connection ID used to connect to Google Cloud.
325
- This parameter has been deprecated. You should pass the gcp_conn_id parameter instead.
326
- :param impersonation_chain: Optional service account to impersonate using short-term
327
- credentials, or chained list of accounts required to get the access_token
328
- of the last account in the list, which will be impersonated in the request.
329
- If set as a string, the account must grant the originating account
330
- the Service Account Token Creator IAM role.
331
- If set as a sequence, the identities from the list must grant
332
- Service Account Token Creator IAM role to the directly preceding identity, with first
333
- account from the list granting this role to the originating account (templated).
334
- :param poke_interval: The interval in seconds to wait between checks table existence.
335
- """
336
-
337
- def __init__(self, **kwargs):
338
- super().__init__(deferrable=True, **kwargs)
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
25
26
  from google.cloud.bigquery_datatransfer_v1 import TransferState
@@ -19,7 +19,8 @@
19
19
 
20
20
  from __future__ import annotations
21
21
 
22
- from typing import TYPE_CHECKING, Sequence
22
+ from collections.abc import Sequence
23
+ from typing import TYPE_CHECKING
23
24
 
24
25
  import google.api_core.exceptions
25
26
  from google.cloud.bigtable import enums