apache-airflow-providers-google 10.20.0rc1__py3-none-any.whl → 10.21.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- airflow/providers/google/__init__.py +1 -1
- airflow/providers/google/ads/hooks/ads.py +16 -8
- airflow/providers/google/ads/transfers/ads_to_gcs.py +2 -1
- airflow/providers/google/cloud/_internal_client/secret_manager_client.py +6 -3
- airflow/providers/google/cloud/hooks/bigquery.py +158 -79
- airflow/providers/google/cloud/hooks/cloud_sql.py +12 -6
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +34 -17
- airflow/providers/google/cloud/hooks/dataflow.py +30 -26
- airflow/providers/google/cloud/hooks/dataform.py +2 -1
- airflow/providers/google/cloud/hooks/datafusion.py +4 -2
- airflow/providers/google/cloud/hooks/dataproc.py +102 -51
- airflow/providers/google/cloud/hooks/functions.py +20 -10
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +22 -11
- airflow/providers/google/cloud/hooks/os_login.py +2 -1
- airflow/providers/google/cloud/hooks/secret_manager.py +18 -9
- airflow/providers/google/cloud/hooks/translate.py +2 -1
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +2 -1
- airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +141 -0
- airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py +2 -1
- airflow/providers/google/cloud/links/base.py +2 -1
- airflow/providers/google/cloud/links/datafusion.py +2 -1
- airflow/providers/google/cloud/log/stackdriver_task_handler.py +4 -2
- airflow/providers/google/cloud/openlineage/mixins.py +10 -0
- airflow/providers/google/cloud/openlineage/utils.py +4 -2
- airflow/providers/google/cloud/operators/bigquery.py +55 -21
- airflow/providers/google/cloud/operators/cloud_batch.py +3 -1
- airflow/providers/google/cloud/operators/cloud_sql.py +22 -11
- airflow/providers/google/cloud/operators/dataform.py +2 -1
- airflow/providers/google/cloud/operators/dataproc.py +75 -34
- airflow/providers/google/cloud/operators/dataproc_metastore.py +24 -12
- airflow/providers/google/cloud/operators/gcs.py +2 -1
- airflow/providers/google/cloud/operators/pubsub.py +10 -5
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +3 -3
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +12 -9
- airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +243 -0
- airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +2 -1
- airflow/providers/google/cloud/operators/vision.py +36 -18
- airflow/providers/google/cloud/sensors/gcs.py +11 -2
- airflow/providers/google/cloud/sensors/pubsub.py +2 -1
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +21 -12
- airflow/providers/google/cloud/transfers/bigquery_to_postgres.py +1 -1
- airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +17 -5
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +12 -6
- airflow/providers/google/cloud/transfers/local_to_gcs.py +5 -1
- airflow/providers/google/cloud/transfers/mysql_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/oracle_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/presto_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +2 -1
- airflow/providers/google/cloud/transfers/trino_to_gcs.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_batch.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_run.py +2 -1
- airflow/providers/google/cloud/triggers/dataflow.py +2 -1
- airflow/providers/google/cloud/triggers/vertex_ai.py +2 -1
- airflow/providers/google/cloud/utils/external_token_supplier.py +4 -2
- airflow/providers/google/cloud/utils/field_sanitizer.py +4 -2
- airflow/providers/google/cloud/utils/field_validator.py +6 -3
- airflow/providers/google/cloud/utils/helpers.py +2 -1
- airflow/providers/google/common/hooks/base_google.py +2 -1
- airflow/providers/google/common/utils/id_token_credentials.py +2 -1
- airflow/providers/google/get_provider_info.py +3 -2
- airflow/providers/google/go_module_utils.py +4 -2
- airflow/providers/google/marketing_platform/hooks/analytics_admin.py +12 -6
- airflow/providers/google/marketing_platform/links/analytics_admin.py +2 -1
- airflow/providers/google/suite/transfers/local_to_drive.py +2 -1
- {apache_airflow_providers_google-10.20.0rc1.dist-info → apache_airflow_providers_google-10.21.0rc1.dist-info}/METADATA +8 -8
- {apache_airflow_providers_google-10.20.0rc1.dist-info → apache_airflow_providers_google-10.21.0rc1.dist-info}/RECORD +69 -69
- {apache_airflow_providers_google-10.20.0rc1.dist-info → apache_airflow_providers_google-10.21.0rc1.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-10.20.0rc1.dist-info → apache_airflow_providers_google-10.21.0rc1.dist-info}/entry_points.txt +0 -0
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "10.
|
32
|
+
__version__ = "10.21.0"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.7.0"
|
@@ -39,7 +39,8 @@ if TYPE_CHECKING:
|
|
39
39
|
|
40
40
|
|
41
41
|
class GoogleAdsHook(BaseHook):
|
42
|
-
"""
|
42
|
+
"""
|
43
|
+
Interact with Google Ads API.
|
43
44
|
|
44
45
|
This hook offers two flows of authentication.
|
45
46
|
|
@@ -118,7 +119,8 @@ class GoogleAdsHook(BaseHook):
|
|
118
119
|
def search(
|
119
120
|
self, client_ids: list[str], query: str, page_size: int = 10000, **kwargs
|
120
121
|
) -> list[GoogleAdsRow]:
|
121
|
-
"""
|
122
|
+
"""
|
123
|
+
Pull data from the Google Ads API.
|
122
124
|
|
123
125
|
Native protobuf message instances are returned (those seen in versions
|
124
126
|
prior to 10.0.0 of the google-ads library).
|
@@ -143,7 +145,8 @@ class GoogleAdsHook(BaseHook):
|
|
143
145
|
def search_proto_plus(
|
144
146
|
self, client_ids: list[str], query: str, page_size: int = 10000, **kwargs
|
145
147
|
) -> list[GoogleAdsRow]:
|
146
|
-
"""
|
148
|
+
"""
|
149
|
+
Pull data from the Google Ads API.
|
147
150
|
|
148
151
|
Instances of proto-plus-python message are returned, which behave more
|
149
152
|
like conventional Python objects.
|
@@ -156,7 +159,8 @@ class GoogleAdsHook(BaseHook):
|
|
156
159
|
return self._search(client_ids, query, page_size, **kwargs)
|
157
160
|
|
158
161
|
def list_accessible_customers(self) -> list[str]:
|
159
|
-
"""
|
162
|
+
"""
|
163
|
+
List resource names of customers.
|
160
164
|
|
161
165
|
The resulting list of customers is based on your OAuth credentials. The
|
162
166
|
request returns a list of all accounts that you are able to act upon
|
@@ -218,7 +222,8 @@ class GoogleAdsHook(BaseHook):
|
|
218
222
|
raise
|
219
223
|
|
220
224
|
def _get_config(self) -> None:
|
221
|
-
"""
|
225
|
+
"""
|
226
|
+
Set up Google Ads config from Connection.
|
222
227
|
|
223
228
|
This pulls the connections from db, and uses it to set up
|
224
229
|
``google_ads_config``.
|
@@ -246,7 +251,8 @@ class GoogleAdsHook(BaseHook):
|
|
246
251
|
raise AirflowException("Authentication method could not be determined")
|
247
252
|
|
248
253
|
def _update_config_with_secret(self, secrets_temp: IO[str]) -> None:
|
249
|
-
"""
|
254
|
+
"""
|
255
|
+
Set up Google Cloud config secret from Connection.
|
250
256
|
|
251
257
|
This pulls the connection, saves the contents to a temp file, and point
|
252
258
|
the config to the path containing the secret. Note that the secret must
|
@@ -264,7 +270,8 @@ class GoogleAdsHook(BaseHook):
|
|
264
270
|
def _search(
|
265
271
|
self, client_ids: list[str], query: str, page_size: int = 10000, **kwargs
|
266
272
|
) -> list[GoogleAdsRow]:
|
267
|
-
"""
|
273
|
+
"""
|
274
|
+
Pull data from the Google Ads API.
|
268
275
|
|
269
276
|
:param client_ids: Google Ads client ID(s) to query the API for.
|
270
277
|
:param query: Google Ads Query Language query.
|
@@ -286,7 +293,8 @@ class GoogleAdsHook(BaseHook):
|
|
286
293
|
return self._extract_rows(iterators)
|
287
294
|
|
288
295
|
def _extract_rows(self, iterators: list[GRPCIterator]) -> list[GoogleAdsRow]:
|
289
|
-
"""
|
296
|
+
"""
|
297
|
+
Convert Google Page Iterator (GRPCIterator) objects to Google Ads Rows.
|
290
298
|
|
291
299
|
:param iterators: List of Google Page Iterator (GRPCIterator) objects
|
292
300
|
:return: API response for all clients in the form of Google Ads Row object(s)
|
@@ -30,7 +30,8 @@ if TYPE_CHECKING:
|
|
30
30
|
|
31
31
|
|
32
32
|
class GoogleAdsToGcsOperator(BaseOperator):
|
33
|
-
"""
|
33
|
+
"""
|
34
|
+
Fetch daily results from the Google Ads API for 1-n clients.
|
34
35
|
|
35
36
|
Converts and saves the data as a temporary CSV file Uploads the CSV to
|
36
37
|
Google Cloud Storage.
|
@@ -33,7 +33,8 @@ SECRET_ID_PATTERN = r"^[a-zA-Z0-9-_]*$"
|
|
33
33
|
|
34
34
|
|
35
35
|
class _SecretManagerClient(LoggingMixin):
|
36
|
-
"""
|
36
|
+
"""
|
37
|
+
Retrieve Secrets object from Google Cloud Secrets Manager.
|
37
38
|
|
38
39
|
This is a common class reused between SecretsManager and Secrets Hook that
|
39
40
|
provides the shared authentication and verification mechanisms. This class
|
@@ -51,7 +52,8 @@ class _SecretManagerClient(LoggingMixin):
|
|
51
52
|
|
52
53
|
@staticmethod
|
53
54
|
def is_valid_secret_name(secret_name: str) -> bool:
|
54
|
-
"""
|
55
|
+
"""
|
56
|
+
Whether the secret name is valid.
|
55
57
|
|
56
58
|
:param secret_name: name of the secret
|
57
59
|
"""
|
@@ -64,7 +66,8 @@ class _SecretManagerClient(LoggingMixin):
|
|
64
66
|
return _client
|
65
67
|
|
66
68
|
def get_secret(self, secret_id: str, project_id: str, secret_version: str = "latest") -> str | None:
|
67
|
-
"""
|
69
|
+
"""
|
70
|
+
Get secret value from the Secret Manager.
|
68
71
|
|
69
72
|
:param secret_id: Secret Key
|
70
73
|
:param project_id: Project id to use
|