apache-airflow-providers-google 16.1.0rc1__py3-none-any.whl → 17.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.
Files changed (66) hide show
  1. airflow/providers/google/__init__.py +1 -1
  2. airflow/providers/google/ads/hooks/ads.py +1 -5
  3. airflow/providers/google/cloud/hooks/bigquery.py +1 -130
  4. airflow/providers/google/cloud/hooks/cloud_logging.py +109 -0
  5. airflow/providers/google/cloud/hooks/cloud_run.py +1 -1
  6. airflow/providers/google/cloud/hooks/cloud_sql.py +5 -5
  7. airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +1 -1
  8. airflow/providers/google/cloud/hooks/dataflow.py +0 -85
  9. airflow/providers/google/cloud/hooks/datafusion.py +1 -1
  10. airflow/providers/google/cloud/hooks/dataprep.py +1 -4
  11. airflow/providers/google/cloud/hooks/dataproc.py +68 -70
  12. airflow/providers/google/cloud/hooks/gcs.py +3 -5
  13. airflow/providers/google/cloud/hooks/kubernetes_engine.py +2 -2
  14. airflow/providers/google/cloud/hooks/looker.py +1 -5
  15. airflow/providers/google/cloud/hooks/stackdriver.py +10 -8
  16. airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +4 -4
  17. airflow/providers/google/cloud/hooks/vertex_ai/experiment_service.py +202 -0
  18. airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +7 -0
  19. airflow/providers/google/cloud/links/kubernetes_engine.py +3 -0
  20. airflow/providers/google/cloud/log/gcs_task_handler.py +2 -2
  21. airflow/providers/google/cloud/log/stackdriver_task_handler.py +1 -1
  22. airflow/providers/google/cloud/openlineage/mixins.py +7 -7
  23. airflow/providers/google/cloud/operators/automl.py +1 -1
  24. airflow/providers/google/cloud/operators/bigquery.py +8 -609
  25. airflow/providers/google/cloud/operators/cloud_logging_sink.py +341 -0
  26. airflow/providers/google/cloud/operators/cloud_sql.py +1 -5
  27. airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +2 -2
  28. airflow/providers/google/cloud/operators/dataproc.py +1 -1
  29. airflow/providers/google/cloud/operators/dlp.py +2 -2
  30. airflow/providers/google/cloud/operators/kubernetes_engine.py +4 -4
  31. airflow/providers/google/cloud/operators/vertex_ai/experiment_service.py +435 -0
  32. airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +7 -1
  33. airflow/providers/google/cloud/operators/vertex_ai/ray.py +7 -5
  34. airflow/providers/google/cloud/operators/vision.py +1 -1
  35. airflow/providers/google/cloud/sensors/dataflow.py +23 -6
  36. airflow/providers/google/cloud/sensors/datafusion.py +2 -2
  37. airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +1 -2
  38. airflow/providers/google/cloud/transfers/gcs_to_local.py +3 -1
  39. airflow/providers/google/cloud/transfers/oracle_to_gcs.py +9 -9
  40. airflow/providers/google/cloud/triggers/bigquery.py +11 -13
  41. airflow/providers/google/cloud/triggers/cloud_build.py +1 -1
  42. airflow/providers/google/cloud/triggers/cloud_run.py +1 -1
  43. airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py +1 -1
  44. airflow/providers/google/cloud/triggers/datafusion.py +1 -1
  45. airflow/providers/google/cloud/triggers/dataproc.py +10 -9
  46. airflow/providers/google/cloud/triggers/kubernetes_engine.py +45 -27
  47. airflow/providers/google/cloud/triggers/mlengine.py +1 -1
  48. airflow/providers/google/cloud/triggers/pubsub.py +1 -1
  49. airflow/providers/google/cloud/utils/credentials_provider.py +1 -1
  50. airflow/providers/google/common/auth_backend/google_openid.py +2 -2
  51. airflow/providers/google/common/hooks/base_google.py +2 -6
  52. airflow/providers/google/common/utils/id_token_credentials.py +2 -2
  53. airflow/providers/google/get_provider_info.py +19 -16
  54. airflow/providers/google/leveldb/hooks/leveldb.py +1 -5
  55. airflow/providers/google/marketing_platform/hooks/display_video.py +47 -3
  56. airflow/providers/google/marketing_platform/links/analytics_admin.py +1 -1
  57. airflow/providers/google/marketing_platform/operators/display_video.py +64 -15
  58. airflow/providers/google/marketing_platform/sensors/display_video.py +9 -2
  59. airflow/providers/google/version_compat.py +10 -3
  60. {apache_airflow_providers_google-16.1.0rc1.dist-info → apache_airflow_providers_google-17.0.0rc1.dist-info}/METADATA +99 -93
  61. {apache_airflow_providers_google-16.1.0rc1.dist-info → apache_airflow_providers_google-17.0.0rc1.dist-info}/RECORD +63 -62
  62. airflow/providers/google/cloud/hooks/life_sciences.py +0 -159
  63. airflow/providers/google/cloud/links/life_sciences.py +0 -30
  64. airflow/providers/google/cloud/operators/life_sciences.py +0 -118
  65. {apache_airflow_providers_google-16.1.0rc1.dist-info → apache_airflow_providers_google-17.0.0rc1.dist-info}/WHEEL +0 -0
  66. {apache_airflow_providers_google-16.1.0rc1.dist-info → apache_airflow_providers_google-17.0.0rc1.dist-info}/entry_points.txt +0 -0
@@ -1,118 +0,0 @@
1
- #
2
- # Licensed to the Apache Software Foundation (ASF) under one
3
- # or more contributor license agreements. See the NOTICE file
4
- # distributed with this work for additional information
5
- # regarding copyright ownership. The ASF licenses this file
6
- # to you under the Apache License, Version 2.0 (the
7
- # "License"); you may not use this file except in compliance
8
- # with the License. You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing,
13
- # software distributed under the License is distributed on an
14
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- # KIND, either express or implied. See the License for the
16
- # specific language governing permissions and limitations
17
- # under the License.
18
- """Operators that interact with Google Cloud Life Sciences service."""
19
-
20
- from __future__ import annotations
21
-
22
- from collections.abc import Sequence
23
- from typing import TYPE_CHECKING
24
-
25
- from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning
26
- from airflow.providers.google.cloud.hooks.life_sciences import LifeSciencesHook
27
- from airflow.providers.google.cloud.links.life_sciences import LifeSciencesLink
28
- from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
29
- from airflow.providers.google.common.deprecated import deprecated
30
- from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
31
-
32
- if TYPE_CHECKING:
33
- from airflow.utils.context import Context
34
-
35
-
36
- @deprecated(
37
- planned_removal_date="July 08, 2025",
38
- use_instead="Google Cloud Batch Operators",
39
- reason="The Life Sciences API (beta) will be discontinued "
40
- "on July 8, 2025 in favor of Google Cloud Batch.",
41
- category=AirflowProviderDeprecationWarning,
42
- )
43
- class LifeSciencesRunPipelineOperator(GoogleCloudBaseOperator):
44
- """
45
- Runs a Life Sciences Pipeline.
46
-
47
- .. warning::
48
- This operator is deprecated. Consider using Google Cloud Batch Operators instead.
49
- The Life Sciences API (beta) will be discontinued on July 8, 2025 in favor
50
- of Google Cloud Batch.
51
-
52
- .. seealso::
53
- For more information on how to use this operator, take a look at the guide:
54
- :ref:`howto/operator:LifeSciencesRunPipelineOperator`
55
-
56
- :param body: The request body
57
- :param location: The location of the project
58
- :param project_id: ID of the Google Cloud project if None then
59
- default project_id is used.
60
- :param gcp_conn_id: The connection ID to use to connect to Google Cloud.
61
- :param api_version: API version used (for example v2beta).
62
- :param impersonation_chain: Optional service account to impersonate using short-term
63
- credentials, or chained list of accounts required to get the access_token
64
- of the last account in the list, which will be impersonated in the request.
65
- If set as a string, the account must grant the originating account
66
- the Service Account Token Creator IAM role.
67
- If set as a sequence, the identities from the list must grant
68
- Service Account Token Creator IAM role to the directly preceding identity, with first
69
- account from the list granting this role to the originating account (templated).
70
- """
71
-
72
- template_fields: Sequence[str] = (
73
- "body",
74
- "gcp_conn_id",
75
- "api_version",
76
- "impersonation_chain",
77
- )
78
- operator_extra_links = (LifeSciencesLink(),)
79
-
80
- def __init__(
81
- self,
82
- *,
83
- body: dict,
84
- location: str,
85
- project_id: str = PROVIDE_PROJECT_ID,
86
- gcp_conn_id: str = "google_cloud_default",
87
- api_version: str = "v2beta",
88
- impersonation_chain: str | Sequence[str] | None = None,
89
- **kwargs,
90
- ) -> None:
91
- super().__init__(**kwargs)
92
- self.body = body
93
- self.location = location
94
- self.project_id = project_id
95
- self.gcp_conn_id = gcp_conn_id
96
- self.api_version = api_version
97
- self._validate_inputs()
98
- self.impersonation_chain = impersonation_chain
99
-
100
- def _validate_inputs(self) -> None:
101
- if not self.body:
102
- raise AirflowException("The required parameter 'body' is missing")
103
- if not self.location:
104
- raise AirflowException("The required parameter 'location' is missing")
105
-
106
- def execute(self, context: Context) -> dict:
107
- hook = LifeSciencesHook(
108
- gcp_conn_id=self.gcp_conn_id,
109
- api_version=self.api_version,
110
- impersonation_chain=self.impersonation_chain,
111
- )
112
- project_id = self.project_id or hook.project_id
113
- if project_id:
114
- LifeSciencesLink.persist(
115
- context=context,
116
- project_id=project_id,
117
- )
118
- return hook.run_pipeline(body=self.body, location=self.location, project_id=self.project_id)