apache-airflow-providers-google 15.1.0rc1__py3-none-any.whl → 16.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 +3 -3
- airflow/providers/google/ads/hooks/ads.py +34 -0
- airflow/providers/google/cloud/hooks/bigquery.py +63 -76
- airflow/providers/google/cloud/hooks/dataflow.py +67 -5
- airflow/providers/google/cloud/hooks/gcs.py +3 -3
- airflow/providers/google/cloud/hooks/looker.py +5 -0
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +0 -36
- airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +1 -66
- airflow/providers/google/cloud/hooks/vertex_ai/ray.py +223 -0
- airflow/providers/google/cloud/links/cloud_run.py +59 -0
- airflow/providers/google/cloud/links/vertex_ai.py +49 -0
- airflow/providers/google/cloud/log/gcs_task_handler.py +7 -5
- airflow/providers/google/cloud/operators/bigquery.py +49 -10
- airflow/providers/google/cloud/operators/cloud_run.py +20 -2
- airflow/providers/google/cloud/operators/gcs.py +1 -0
- airflow/providers/google/cloud/operators/kubernetes_engine.py +4 -86
- airflow/providers/google/cloud/operators/pubsub.py +2 -1
- airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +0 -92
- airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +4 -0
- airflow/providers/google/cloud/operators/vertex_ai/ray.py +388 -0
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +9 -5
- airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +2 -0
- airflow/providers/google/cloud/transfers/http_to_gcs.py +193 -0
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +11 -5
- airflow/providers/google/cloud/triggers/bigquery.py +32 -5
- airflow/providers/google/cloud/triggers/dataflow.py +122 -0
- airflow/providers/google/cloud/triggers/dataproc.py +62 -10
- airflow/providers/google/get_provider_info.py +18 -5
- airflow/providers/google/leveldb/hooks/leveldb.py +25 -0
- airflow/providers/google/version_compat.py +0 -1
- {apache_airflow_providers_google-15.1.0rc1.dist-info → apache_airflow_providers_google-16.0.0rc1.dist-info}/METADATA +97 -90
- {apache_airflow_providers_google-15.1.0rc1.dist-info → apache_airflow_providers_google-16.0.0rc1.dist-info}/RECORD +35 -32
- airflow/providers/google/cloud/links/automl.py +0 -193
- {apache_airflow_providers_google-15.1.0rc1.dist-info → apache_airflow_providers_google-16.0.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-15.1.0rc1.dist-info → apache_airflow_providers_google-16.0.0rc1.dist-info}/entry_points.txt +0 -0
@@ -1,193 +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
|
-
"""This module contains Google AutoML links."""
|
19
|
-
|
20
|
-
from __future__ import annotations
|
21
|
-
|
22
|
-
from typing import TYPE_CHECKING
|
23
|
-
|
24
|
-
from airflow.exceptions import AirflowProviderDeprecationWarning
|
25
|
-
from airflow.providers.google.cloud.links.base import BaseGoogleLink
|
26
|
-
from airflow.providers.google.common.deprecated import deprecated
|
27
|
-
|
28
|
-
if TYPE_CHECKING:
|
29
|
-
from airflow.utils.context import Context
|
30
|
-
|
31
|
-
AUTOML_BASE_LINK = "https://console.cloud.google.com/automl-tables"
|
32
|
-
AUTOML_DATASET_LINK = (
|
33
|
-
AUTOML_BASE_LINK + "/locations/{location}/datasets/{dataset_id}/schemav2?project={project_id}"
|
34
|
-
)
|
35
|
-
AUTOML_DATASET_LIST_LINK = AUTOML_BASE_LINK + "/datasets?project={project_id}"
|
36
|
-
AUTOML_MODEL_LINK = (
|
37
|
-
AUTOML_BASE_LINK
|
38
|
-
+ "/locations/{location}/datasets/{dataset_id};modelId={model_id}/evaluate?project={project_id}"
|
39
|
-
)
|
40
|
-
AUTOML_MODEL_TRAIN_LINK = (
|
41
|
-
AUTOML_BASE_LINK + "/locations/{location}/datasets/{dataset_id}/train?project={project_id}"
|
42
|
-
)
|
43
|
-
AUTOML_MODEL_PREDICT_LINK = (
|
44
|
-
AUTOML_BASE_LINK
|
45
|
-
+ "/locations/{location}/datasets/{dataset_id};modelId={model_id}/predict?project={project_id}"
|
46
|
-
)
|
47
|
-
|
48
|
-
|
49
|
-
@deprecated(
|
50
|
-
planned_removal_date="December 31, 2024",
|
51
|
-
use_instead="TranslationLegacyDatasetLink class from airflow/providers/google/cloud/links/translate.py",
|
52
|
-
category=AirflowProviderDeprecationWarning,
|
53
|
-
)
|
54
|
-
class AutoMLDatasetLink(BaseGoogleLink):
|
55
|
-
"""Helper class for constructing AutoML Dataset link."""
|
56
|
-
|
57
|
-
name = "AutoML Dataset"
|
58
|
-
key = "automl_dataset"
|
59
|
-
format_str = AUTOML_DATASET_LINK
|
60
|
-
|
61
|
-
@staticmethod
|
62
|
-
def persist(
|
63
|
-
context: Context,
|
64
|
-
task_instance,
|
65
|
-
dataset_id: str,
|
66
|
-
project_id: str,
|
67
|
-
):
|
68
|
-
task_instance.xcom_push(
|
69
|
-
context,
|
70
|
-
key=AutoMLDatasetLink.key,
|
71
|
-
value={"location": task_instance.location, "dataset_id": dataset_id, "project_id": project_id},
|
72
|
-
)
|
73
|
-
|
74
|
-
|
75
|
-
@deprecated(
|
76
|
-
planned_removal_date="December 31, 2024",
|
77
|
-
use_instead="TranslationDatasetListLink class from airflow/providers/google/cloud/links/translate.py",
|
78
|
-
category=AirflowProviderDeprecationWarning,
|
79
|
-
)
|
80
|
-
class AutoMLDatasetListLink(BaseGoogleLink):
|
81
|
-
"""Helper class for constructing AutoML Dataset List link."""
|
82
|
-
|
83
|
-
name = "AutoML Dataset List"
|
84
|
-
key = "automl_dataset_list"
|
85
|
-
format_str = AUTOML_DATASET_LIST_LINK
|
86
|
-
|
87
|
-
@staticmethod
|
88
|
-
def persist(
|
89
|
-
context: Context,
|
90
|
-
task_instance,
|
91
|
-
project_id: str,
|
92
|
-
):
|
93
|
-
task_instance.xcom_push(
|
94
|
-
context,
|
95
|
-
key=AutoMLDatasetListLink.key,
|
96
|
-
value={
|
97
|
-
"project_id": project_id,
|
98
|
-
},
|
99
|
-
)
|
100
|
-
|
101
|
-
|
102
|
-
@deprecated(
|
103
|
-
planned_removal_date="December 31, 2024",
|
104
|
-
use_instead="TranslationLegacyModelLink class from airflow/providers/google/cloud/links/translate.py",
|
105
|
-
category=AirflowProviderDeprecationWarning,
|
106
|
-
)
|
107
|
-
class AutoMLModelLink(BaseGoogleLink):
|
108
|
-
"""Helper class for constructing AutoML Model link."""
|
109
|
-
|
110
|
-
name = "AutoML Model"
|
111
|
-
key = "automl_model"
|
112
|
-
format_str = AUTOML_MODEL_LINK
|
113
|
-
|
114
|
-
@staticmethod
|
115
|
-
def persist(
|
116
|
-
context: Context,
|
117
|
-
task_instance,
|
118
|
-
dataset_id: str,
|
119
|
-
model_id: str,
|
120
|
-
project_id: str,
|
121
|
-
):
|
122
|
-
task_instance.xcom_push(
|
123
|
-
context,
|
124
|
-
key=AutoMLModelLink.key,
|
125
|
-
value={
|
126
|
-
"location": task_instance.location,
|
127
|
-
"dataset_id": dataset_id,
|
128
|
-
"model_id": model_id,
|
129
|
-
"project_id": project_id,
|
130
|
-
},
|
131
|
-
)
|
132
|
-
|
133
|
-
|
134
|
-
@deprecated(
|
135
|
-
planned_removal_date="December 31, 2024",
|
136
|
-
use_instead="TranslationLegacyModelTrainLink class from "
|
137
|
-
"airflow/providers/google/cloud/links/translate.py",
|
138
|
-
category=AirflowProviderDeprecationWarning,
|
139
|
-
)
|
140
|
-
class AutoMLModelTrainLink(BaseGoogleLink):
|
141
|
-
"""Helper class for constructing AutoML Model Train link."""
|
142
|
-
|
143
|
-
name = "AutoML Model Train"
|
144
|
-
key = "automl_model_train"
|
145
|
-
format_str = AUTOML_MODEL_TRAIN_LINK
|
146
|
-
|
147
|
-
@staticmethod
|
148
|
-
def persist(
|
149
|
-
context: Context,
|
150
|
-
task_instance,
|
151
|
-
project_id: str,
|
152
|
-
):
|
153
|
-
task_instance.xcom_push(
|
154
|
-
context,
|
155
|
-
key=AutoMLModelTrainLink.key,
|
156
|
-
value={
|
157
|
-
"location": task_instance.location,
|
158
|
-
"dataset_id": task_instance.model["dataset_id"],
|
159
|
-
"project_id": project_id,
|
160
|
-
},
|
161
|
-
)
|
162
|
-
|
163
|
-
|
164
|
-
@deprecated(
|
165
|
-
planned_removal_date="December 31, 2024",
|
166
|
-
use_instead="TranslationLegacyModelPredictLink class from "
|
167
|
-
"airflow/providers/google/cloud/links/translate.py",
|
168
|
-
category=AirflowProviderDeprecationWarning,
|
169
|
-
)
|
170
|
-
class AutoMLModelPredictLink(BaseGoogleLink):
|
171
|
-
"""Helper class for constructing AutoML Model Predict link."""
|
172
|
-
|
173
|
-
name = "AutoML Model Predict"
|
174
|
-
key = "automl_model_predict"
|
175
|
-
format_str = AUTOML_MODEL_PREDICT_LINK
|
176
|
-
|
177
|
-
@staticmethod
|
178
|
-
def persist(
|
179
|
-
context: Context,
|
180
|
-
task_instance,
|
181
|
-
model_id: str,
|
182
|
-
project_id: str,
|
183
|
-
):
|
184
|
-
task_instance.xcom_push(
|
185
|
-
context,
|
186
|
-
key=AutoMLModelPredictLink.key,
|
187
|
-
value={
|
188
|
-
"location": task_instance.location,
|
189
|
-
"dataset_id": "-",
|
190
|
-
"model_id": model_id,
|
191
|
-
"project_id": project_id,
|
192
|
-
},
|
193
|
-
)
|
File without changes
|