apache-airflow-providers-google 16.0.0rc1__py3-none-any.whl → 16.1.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.
- airflow/providers/google/__init__.py +1 -1
- airflow/providers/google/ads/hooks/ads.py +9 -5
- airflow/providers/google/ads/operators/ads.py +1 -1
- airflow/providers/google/ads/transfers/ads_to_gcs.py +1 -1
- airflow/providers/google/cloud/hooks/bigquery.py +2 -3
- airflow/providers/google/cloud/hooks/cloud_sql.py +8 -4
- airflow/providers/google/cloud/hooks/datacatalog.py +9 -1
- airflow/providers/google/cloud/hooks/dataflow.py +2 -2
- airflow/providers/google/cloud/hooks/dataplex.py +1 -1
- airflow/providers/google/cloud/hooks/dataprep.py +4 -1
- airflow/providers/google/cloud/hooks/gcs.py +2 -2
- airflow/providers/google/cloud/hooks/looker.py +5 -1
- airflow/providers/google/cloud/hooks/mlengine.py +2 -1
- airflow/providers/google/cloud/hooks/secret_manager.py +102 -10
- airflow/providers/google/cloud/hooks/spanner.py +2 -2
- airflow/providers/google/cloud/hooks/translate.py +1 -1
- airflow/providers/google/cloud/hooks/vertex_ai/feature_store.py +307 -7
- airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +43 -14
- airflow/providers/google/cloud/hooks/vertex_ai/ray.py +11 -2
- airflow/providers/google/cloud/hooks/vision.py +2 -2
- airflow/providers/google/cloud/links/alloy_db.py +0 -46
- airflow/providers/google/cloud/links/base.py +75 -11
- airflow/providers/google/cloud/links/bigquery.py +0 -47
- airflow/providers/google/cloud/links/bigquery_dts.py +0 -20
- airflow/providers/google/cloud/links/bigtable.py +0 -48
- airflow/providers/google/cloud/links/cloud_build.py +0 -73
- airflow/providers/google/cloud/links/cloud_functions.py +0 -33
- airflow/providers/google/cloud/links/cloud_memorystore.py +0 -58
- airflow/providers/google/cloud/links/cloud_run.py +1 -33
- airflow/providers/google/cloud/links/cloud_sql.py +0 -33
- airflow/providers/google/cloud/links/cloud_storage_transfer.py +16 -43
- airflow/providers/google/cloud/links/cloud_tasks.py +6 -25
- airflow/providers/google/cloud/links/compute.py +0 -58
- airflow/providers/google/cloud/links/data_loss_prevention.py +0 -169
- airflow/providers/google/cloud/links/datacatalog.py +23 -54
- airflow/providers/google/cloud/links/dataflow.py +0 -34
- airflow/providers/google/cloud/links/dataform.py +0 -64
- airflow/providers/google/cloud/links/datafusion.py +1 -96
- airflow/providers/google/cloud/links/dataplex.py +0 -154
- airflow/providers/google/cloud/links/dataprep.py +0 -24
- airflow/providers/google/cloud/links/dataproc.py +14 -90
- airflow/providers/google/cloud/links/datastore.py +0 -31
- airflow/providers/google/cloud/links/kubernetes_engine.py +5 -59
- airflow/providers/google/cloud/links/life_sciences.py +0 -19
- airflow/providers/google/cloud/links/managed_kafka.py +0 -70
- airflow/providers/google/cloud/links/mlengine.py +0 -70
- airflow/providers/google/cloud/links/pubsub.py +0 -32
- airflow/providers/google/cloud/links/spanner.py +0 -33
- airflow/providers/google/cloud/links/stackdriver.py +0 -30
- airflow/providers/google/cloud/links/translate.py +16 -186
- airflow/providers/google/cloud/links/vertex_ai.py +8 -224
- airflow/providers/google/cloud/links/workflows.py +0 -52
- airflow/providers/google/cloud/operators/alloy_db.py +69 -54
- airflow/providers/google/cloud/operators/automl.py +16 -14
- airflow/providers/google/cloud/operators/bigquery.py +0 -15
- airflow/providers/google/cloud/operators/bigquery_dts.py +2 -4
- airflow/providers/google/cloud/operators/bigtable.py +35 -6
- airflow/providers/google/cloud/operators/cloud_base.py +21 -1
- airflow/providers/google/cloud/operators/cloud_build.py +74 -31
- airflow/providers/google/cloud/operators/cloud_composer.py +34 -35
- airflow/providers/google/cloud/operators/cloud_memorystore.py +68 -42
- airflow/providers/google/cloud/operators/cloud_run.py +0 -1
- airflow/providers/google/cloud/operators/cloud_sql.py +11 -15
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +0 -2
- airflow/providers/google/cloud/operators/compute.py +7 -39
- airflow/providers/google/cloud/operators/datacatalog.py +156 -20
- airflow/providers/google/cloud/operators/dataflow.py +37 -14
- airflow/providers/google/cloud/operators/dataform.py +14 -4
- airflow/providers/google/cloud/operators/datafusion.py +4 -12
- airflow/providers/google/cloud/operators/dataplex.py +180 -96
- airflow/providers/google/cloud/operators/dataprep.py +0 -4
- airflow/providers/google/cloud/operators/dataproc.py +10 -16
- airflow/providers/google/cloud/operators/dataproc_metastore.py +95 -87
- airflow/providers/google/cloud/operators/datastore.py +21 -5
- airflow/providers/google/cloud/operators/dlp.py +3 -26
- airflow/providers/google/cloud/operators/functions.py +15 -6
- airflow/providers/google/cloud/operators/gcs.py +0 -7
- airflow/providers/google/cloud/operators/kubernetes_engine.py +50 -7
- airflow/providers/google/cloud/operators/life_sciences.py +0 -1
- airflow/providers/google/cloud/operators/managed_kafka.py +106 -51
- airflow/providers/google/cloud/operators/mlengine.py +0 -1
- airflow/providers/google/cloud/operators/pubsub.py +2 -4
- airflow/providers/google/cloud/operators/spanner.py +0 -4
- airflow/providers/google/cloud/operators/speech_to_text.py +0 -1
- airflow/providers/google/cloud/operators/stackdriver.py +0 -8
- airflow/providers/google/cloud/operators/tasks.py +0 -11
- airflow/providers/google/cloud/operators/text_to_speech.py +0 -1
- airflow/providers/google/cloud/operators/translate.py +37 -13
- airflow/providers/google/cloud/operators/translate_speech.py +0 -1
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +31 -18
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +28 -8
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +38 -25
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +69 -7
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +42 -8
- airflow/providers/google/cloud/operators/vertex_ai/feature_store.py +531 -0
- airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +93 -25
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +10 -8
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +56 -10
- airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +25 -6
- airflow/providers/google/cloud/operators/vertex_ai/ray.py +9 -6
- airflow/providers/google/cloud/operators/workflows.py +1 -9
- airflow/providers/google/cloud/sensors/bigquery.py +1 -1
- airflow/providers/google/cloud/sensors/bigquery_dts.py +6 -1
- airflow/providers/google/cloud/sensors/bigtable.py +15 -3
- airflow/providers/google/cloud/sensors/cloud_composer.py +6 -1
- airflow/providers/google/cloud/sensors/cloud_storage_transfer_service.py +6 -1
- airflow/providers/google/cloud/sensors/dataflow.py +3 -3
- airflow/providers/google/cloud/sensors/dataform.py +6 -1
- airflow/providers/google/cloud/sensors/datafusion.py +6 -1
- airflow/providers/google/cloud/sensors/dataplex.py +6 -1
- airflow/providers/google/cloud/sensors/dataprep.py +6 -1
- airflow/providers/google/cloud/sensors/dataproc.py +6 -1
- airflow/providers/google/cloud/sensors/dataproc_metastore.py +6 -1
- airflow/providers/google/cloud/sensors/gcs.py +9 -3
- airflow/providers/google/cloud/sensors/looker.py +6 -1
- airflow/providers/google/cloud/sensors/pubsub.py +8 -3
- airflow/providers/google/cloud/sensors/tasks.py +6 -1
- airflow/providers/google/cloud/sensors/vertex_ai/feature_store.py +6 -1
- airflow/providers/google/cloud/sensors/workflows.py +6 -1
- airflow/providers/google/cloud/transfers/azure_blob_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +1 -2
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +1 -2
- airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +0 -1
- airflow/providers/google/cloud/transfers/bigquery_to_sql.py +1 -1
- airflow/providers/google/cloud/transfers/calendar_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +1 -2
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/gcs_to_local.py +1 -1
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +1 -1
- airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +5 -1
- airflow/providers/google/cloud/transfers/gdrive_to_local.py +1 -1
- airflow/providers/google/cloud/transfers/http_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/local_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/salesforce_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/sheets_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/sql_to_gcs.py +1 -1
- airflow/providers/google/cloud/utils/field_validator.py +1 -2
- airflow/providers/google/common/auth_backend/google_openid.py +2 -1
- airflow/providers/google/common/deprecated.py +2 -1
- airflow/providers/google/common/hooks/base_google.py +7 -3
- airflow/providers/google/common/links/storage.py +0 -22
- airflow/providers/google/firebase/operators/firestore.py +1 -1
- airflow/providers/google/get_provider_info.py +0 -11
- airflow/providers/google/leveldb/hooks/leveldb.py +5 -1
- airflow/providers/google/leveldb/operators/leveldb.py +1 -1
- airflow/providers/google/marketing_platform/links/analytics_admin.py +3 -6
- airflow/providers/google/marketing_platform/operators/analytics_admin.py +0 -1
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +4 -4
- airflow/providers/google/marketing_platform/operators/display_video.py +6 -6
- airflow/providers/google/marketing_platform/operators/search_ads.py +1 -1
- airflow/providers/google/marketing_platform/sensors/campaign_manager.py +6 -1
- airflow/providers/google/marketing_platform/sensors/display_video.py +6 -1
- airflow/providers/google/suite/operators/sheets.py +3 -3
- airflow/providers/google/suite/sensors/drive.py +6 -1
- airflow/providers/google/suite/transfers/gcs_to_gdrive.py +1 -1
- airflow/providers/google/suite/transfers/gcs_to_sheets.py +1 -1
- airflow/providers/google/suite/transfers/local_to_drive.py +1 -1
- airflow/providers/google/version_compat.py +28 -0
- {apache_airflow_providers_google-16.0.0rc1.dist-info → apache_airflow_providers_google-16.1.0.dist-info}/METADATA +27 -28
- {apache_airflow_providers_google-16.0.0rc1.dist-info → apache_airflow_providers_google-16.1.0.dist-info}/RECORD +166 -166
- {apache_airflow_providers_google-16.0.0rc1.dist-info → apache_airflow_providers_google-16.1.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-16.0.0rc1.dist-info → apache_airflow_providers_google-16.1.0.dist-info}/entry_points.txt +0 -0
@@ -18,18 +18,12 @@
|
|
18
18
|
|
19
19
|
from __future__ import annotations
|
20
20
|
|
21
|
-
from typing import TYPE_CHECKING
|
22
|
-
|
23
21
|
from airflow.providers.google.cloud.links.base import BaseGoogleLink
|
24
22
|
|
25
23
|
BASE_LINK = "https://console.cloud.google.com"
|
26
24
|
GCS_STORAGE_LINK = BASE_LINK + "/storage/browser/{uri};tab=objects?project={project_id}"
|
27
25
|
GCS_FILE_DETAILS_LINK = BASE_LINK + "/storage/browser/_details/{uri};tab=live_object?project={project_id}"
|
28
26
|
|
29
|
-
if TYPE_CHECKING:
|
30
|
-
from airflow.models import BaseOperator
|
31
|
-
from airflow.utils.context import Context
|
32
|
-
|
33
27
|
|
34
28
|
class StorageLink(BaseGoogleLink):
|
35
29
|
"""Helper class for constructing GCS Storage link."""
|
@@ -38,14 +32,6 @@ class StorageLink(BaseGoogleLink):
|
|
38
32
|
key = "storage_conf"
|
39
33
|
format_str = GCS_STORAGE_LINK
|
40
34
|
|
41
|
-
@staticmethod
|
42
|
-
def persist(context: Context, task_instance, uri: str, project_id: str | None):
|
43
|
-
task_instance.xcom_push(
|
44
|
-
context=context,
|
45
|
-
key=StorageLink.key,
|
46
|
-
value={"uri": uri, "project_id": project_id},
|
47
|
-
)
|
48
|
-
|
49
35
|
|
50
36
|
class FileDetailsLink(BaseGoogleLink):
|
51
37
|
"""Helper class for constructing GCS file details link."""
|
@@ -53,11 +39,3 @@ class FileDetailsLink(BaseGoogleLink):
|
|
53
39
|
name = "GCS File Details"
|
54
40
|
key = "file_details"
|
55
41
|
format_str = GCS_FILE_DETAILS_LINK
|
56
|
-
|
57
|
-
@staticmethod
|
58
|
-
def persist(context: Context, task_instance: BaseOperator, uri: str, project_id: str | None):
|
59
|
-
task_instance.xcom_push(
|
60
|
-
context=context,
|
61
|
-
key=FileDetailsLink.key,
|
62
|
-
value={"uri": uri, "project_id": project_id},
|
63
|
-
)
|
@@ -20,9 +20,9 @@ from collections.abc import Sequence
|
|
20
20
|
from typing import TYPE_CHECKING
|
21
21
|
|
22
22
|
from airflow.exceptions import AirflowException
|
23
|
-
from airflow.models import BaseOperator
|
24
23
|
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
|
25
24
|
from airflow.providers.google.firebase.hooks.firestore import CloudFirestoreHook
|
25
|
+
from airflow.providers.google.version_compat import BaseOperator
|
26
26
|
|
27
27
|
if TYPE_CHECKING:
|
28
28
|
from airflow.utils.context import Context
|
@@ -528,10 +528,6 @@ def get_provider_info():
|
|
528
528
|
"integration-name": "Google Compute Engine",
|
529
529
|
"python-modules": ["airflow.providers.google.cloud.operators.compute"],
|
530
530
|
},
|
531
|
-
{
|
532
|
-
"integration-name": "Google Data Catalog",
|
533
|
-
"python-modules": ["airflow.providers.google.cloud.operators.datacatalog"],
|
534
|
-
},
|
535
531
|
{
|
536
532
|
"integration-name": "Google Dataflow",
|
537
533
|
"python-modules": ["airflow.providers.google.cloud.operators.dataflow"],
|
@@ -865,10 +861,6 @@ def get_provider_info():
|
|
865
861
|
"airflow.providers.google.cloud.hooks.compute_ssh",
|
866
862
|
],
|
867
863
|
},
|
868
|
-
{
|
869
|
-
"integration-name": "Google Data Catalog",
|
870
|
-
"python-modules": ["airflow.providers.google.cloud.hooks.datacatalog"],
|
871
|
-
},
|
872
864
|
{
|
873
865
|
"integration-name": "Google Dataflow",
|
874
866
|
"python-modules": ["airflow.providers.google.cloud.hooks.dataflow"],
|
@@ -1414,9 +1406,6 @@ def get_provider_info():
|
|
1414
1406
|
"airflow.providers.google.cloud.links.compute.ComputeInstanceGroupManagerDetailsLink",
|
1415
1407
|
"airflow.providers.google.cloud.links.cloud_tasks.CloudTasksQueueLink",
|
1416
1408
|
"airflow.providers.google.cloud.links.cloud_tasks.CloudTasksLink",
|
1417
|
-
"airflow.providers.google.cloud.links.datacatalog.DataCatalogEntryGroupLink",
|
1418
|
-
"airflow.providers.google.cloud.links.datacatalog.DataCatalogEntryLink",
|
1419
|
-
"airflow.providers.google.cloud.links.datacatalog.DataCatalogTagTemplateLink",
|
1420
1409
|
"airflow.providers.google.cloud.links.dataproc.DataprocLink",
|
1421
1410
|
"airflow.providers.google.cloud.links.dataproc.DataprocListLink",
|
1422
1411
|
"airflow.providers.google.cloud.links.dataproc.DataprocClusterLink",
|
@@ -21,7 +21,11 @@ from __future__ import annotations
|
|
21
21
|
from typing import Any
|
22
22
|
|
23
23
|
from airflow.exceptions import AirflowException, AirflowOptionalProviderFeatureException
|
24
|
-
|
24
|
+
|
25
|
+
try:
|
26
|
+
from airflow.sdk import BaseHook
|
27
|
+
except ImportError:
|
28
|
+
from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
|
25
29
|
|
26
30
|
try:
|
27
31
|
import plyvel
|
@@ -18,8 +18,8 @@ from __future__ import annotations
|
|
18
18
|
|
19
19
|
from typing import TYPE_CHECKING, Any
|
20
20
|
|
21
|
-
from airflow.models import BaseOperator
|
22
21
|
from airflow.providers.google.leveldb.hooks.leveldb import LevelDBHook
|
22
|
+
from airflow.providers.google.version_compat import BaseOperator
|
23
23
|
|
24
24
|
if TYPE_CHECKING:
|
25
25
|
from airflow.utils.context import Context
|
@@ -18,13 +18,12 @@ from __future__ import annotations
|
|
18
18
|
|
19
19
|
from typing import TYPE_CHECKING, ClassVar
|
20
20
|
|
21
|
+
from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS, BaseOperator
|
22
|
+
|
21
23
|
if TYPE_CHECKING:
|
22
|
-
from airflow.models import BaseOperator
|
23
24
|
from airflow.models.taskinstancekey import TaskInstanceKey
|
24
25
|
from airflow.utils.context import Context
|
25
26
|
|
26
|
-
from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS
|
27
|
-
|
28
27
|
if AIRFLOW_V_3_0_PLUS:
|
29
28
|
from airflow.sdk import BaseOperatorLink
|
30
29
|
from airflow.sdk.execution_time.xcom import XCom
|
@@ -64,11 +63,9 @@ class GoogleAnalyticsPropertyLink(GoogleAnalyticsBaseLink):
|
|
64
63
|
@staticmethod
|
65
64
|
def persist(
|
66
65
|
context: Context,
|
67
|
-
task_instance: BaseOperator,
|
68
66
|
property_id: str,
|
69
67
|
):
|
70
|
-
task_instance.xcom_push(
|
71
|
-
context,
|
68
|
+
context["task_instance"].xcom_push(
|
72
69
|
key=GoogleAnalyticsPropertyLink.key,
|
73
70
|
value={"property_id": property_id},
|
74
71
|
)
|
@@ -194,7 +194,6 @@ class GoogleAnalyticsAdminCreatePropertyOperator(GoogleCloudBaseOperator):
|
|
194
194
|
self.log.info("The Google Analytics property %s was created successfully.", prop.name)
|
195
195
|
GoogleAnalyticsPropertyLink.persist(
|
196
196
|
context=context,
|
197
|
-
task_instance=self,
|
198
197
|
property_id=prop.name.lstrip("properties/"),
|
199
198
|
)
|
200
199
|
|
@@ -28,9 +28,9 @@ from typing import TYPE_CHECKING, Any
|
|
28
28
|
from googleapiclient import http
|
29
29
|
|
30
30
|
from airflow.exceptions import AirflowException
|
31
|
-
from airflow.models import BaseOperator
|
32
31
|
from airflow.providers.google.cloud.hooks.gcs import GCSHook
|
33
32
|
from airflow.providers.google.marketing_platform.hooks.campaign_manager import GoogleCampaignManagerHook
|
33
|
+
from airflow.providers.google.version_compat import BaseOperator
|
34
34
|
|
35
35
|
if TYPE_CHECKING:
|
36
36
|
from airflow.utils.context import Context
|
@@ -237,7 +237,7 @@ class GoogleCampaignManagerDownloadReportOperator(BaseOperator):
|
|
237
237
|
mime_type="text/csv",
|
238
238
|
)
|
239
239
|
|
240
|
-
|
240
|
+
context["task_instance"].xcom_push(key="report_name", value=report_name)
|
241
241
|
|
242
242
|
|
243
243
|
class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
@@ -308,7 +308,7 @@ class GoogleCampaignManagerInsertReportOperator(BaseOperator):
|
|
308
308
|
self.log.info("Inserting Campaign Manager report.")
|
309
309
|
response = hook.insert_report(profile_id=self.profile_id, report=self.report)
|
310
310
|
report_id = response.get("id")
|
311
|
-
|
311
|
+
context["task_instance"].xcom_push(key="report_id", value=report_id)
|
312
312
|
self.log.info("Report successfully inserted. Report id: %s", report_id)
|
313
313
|
return response
|
314
314
|
|
@@ -381,7 +381,7 @@ class GoogleCampaignManagerRunReportOperator(BaseOperator):
|
|
381
381
|
synchronous=self.synchronous,
|
382
382
|
)
|
383
383
|
file_id = response.get("id")
|
384
|
-
|
384
|
+
context["task_instance"].xcom_push(key="file_id", value=file_id)
|
385
385
|
self.log.info("Report file id: %s", file_id)
|
386
386
|
return response
|
387
387
|
|
@@ -29,9 +29,9 @@ from typing import TYPE_CHECKING, Any
|
|
29
29
|
from urllib.parse import urlsplit
|
30
30
|
|
31
31
|
from airflow.exceptions import AirflowException
|
32
|
-
from airflow.models import BaseOperator
|
33
32
|
from airflow.providers.google.cloud.hooks.gcs import GCSHook
|
34
33
|
from airflow.providers.google.marketing_platform.hooks.display_video import GoogleDisplayVideo360Hook
|
34
|
+
from airflow.providers.google.version_compat import BaseOperator
|
35
35
|
|
36
36
|
if TYPE_CHECKING:
|
37
37
|
from airflow.utils.context import Context
|
@@ -99,7 +99,7 @@ class GoogleDisplayVideo360CreateQueryOperator(BaseOperator):
|
|
99
99
|
self.log.info("Creating Display & Video 360 query.")
|
100
100
|
response = hook.create_query(query=self.body)
|
101
101
|
query_id = response["queryId"]
|
102
|
-
|
102
|
+
context["task_instance"].xcom_push(key="query_id", value=query_id)
|
103
103
|
self.log.info("Created query with ID: %s", query_id)
|
104
104
|
return response
|
105
105
|
|
@@ -295,7 +295,7 @@ class GoogleDisplayVideo360DownloadReportV2Operator(BaseOperator):
|
|
295
295
|
self.bucket_name,
|
296
296
|
report_name,
|
297
297
|
)
|
298
|
-
|
298
|
+
context["task_instance"].xcom_push(key="report_name", value=report_name)
|
299
299
|
|
300
300
|
|
301
301
|
class GoogleDisplayVideo360RunQueryOperator(BaseOperator):
|
@@ -360,8 +360,8 @@ class GoogleDisplayVideo360RunQueryOperator(BaseOperator):
|
|
360
360
|
self.parameters,
|
361
361
|
)
|
362
362
|
response = hook.run_query(query_id=self.query_id, params=self.parameters)
|
363
|
-
|
364
|
-
|
363
|
+
context["task_instance"].xcom_push(key="query_id", value=response["key"]["queryId"])
|
364
|
+
context["task_instance"].xcom_push(key="report_id", value=response["key"]["reportId"])
|
365
365
|
return response
|
366
366
|
|
367
367
|
|
@@ -564,7 +564,7 @@ class GoogleDisplayVideo360CreateSDFDownloadTaskOperator(BaseOperator):
|
|
564
564
|
operation = hook.create_sdf_download_operation(body_request=self.body_request)
|
565
565
|
|
566
566
|
name = operation["name"]
|
567
|
-
|
567
|
+
context["task_instance"].xcom_push(key="name", value=name)
|
568
568
|
self.log.info("Created SDF operation with name: %s", name)
|
569
569
|
|
570
570
|
return operation
|
@@ -23,8 +23,8 @@ from collections.abc import Sequence
|
|
23
23
|
from functools import cached_property
|
24
24
|
from typing import TYPE_CHECKING, Any
|
25
25
|
|
26
|
-
from airflow.models import BaseOperator
|
27
26
|
from airflow.providers.google.marketing_platform.hooks.search_ads import GoogleSearchAdsReportingHook
|
27
|
+
from airflow.providers.google.version_compat import BaseOperator
|
28
28
|
|
29
29
|
if TYPE_CHECKING:
|
30
30
|
from airflow.utils.context import Context
|
@@ -23,7 +23,12 @@ from collections.abc import Sequence
|
|
23
23
|
from typing import TYPE_CHECKING
|
24
24
|
|
25
25
|
from airflow.providers.google.marketing_platform.hooks.campaign_manager import GoogleCampaignManagerHook
|
26
|
-
from airflow.
|
26
|
+
from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS
|
27
|
+
|
28
|
+
if AIRFLOW_V_3_0_PLUS:
|
29
|
+
from airflow.sdk import BaseSensorOperator
|
30
|
+
else:
|
31
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
27
32
|
|
28
33
|
if TYPE_CHECKING:
|
29
34
|
from airflow.utils.context import Context
|
@@ -23,7 +23,12 @@ from typing import TYPE_CHECKING
|
|
23
23
|
|
24
24
|
from airflow.exceptions import AirflowException
|
25
25
|
from airflow.providers.google.marketing_platform.hooks.display_video import GoogleDisplayVideo360Hook
|
26
|
-
from airflow.
|
26
|
+
from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS
|
27
|
+
|
28
|
+
if AIRFLOW_V_3_0_PLUS:
|
29
|
+
from airflow.sdk import BaseSensorOperator
|
30
|
+
else:
|
31
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
27
32
|
|
28
33
|
if TYPE_CHECKING:
|
29
34
|
from airflow.utils.context import Context
|
@@ -19,8 +19,8 @@ from __future__ import annotations
|
|
19
19
|
from collections.abc import Sequence
|
20
20
|
from typing import Any
|
21
21
|
|
22
|
-
from airflow.models import BaseOperator
|
23
22
|
from airflow.providers.google.suite.hooks.sheets import GSheetsHook
|
23
|
+
from airflow.providers.google.version_compat import BaseOperator
|
24
24
|
|
25
25
|
|
26
26
|
class GoogleSheetsCreateSpreadsheetOperator(BaseOperator):
|
@@ -68,6 +68,6 @@ class GoogleSheetsCreateSpreadsheetOperator(BaseOperator):
|
|
68
68
|
impersonation_chain=self.impersonation_chain,
|
69
69
|
)
|
70
70
|
spreadsheet = hook.create_spreadsheet(spreadsheet=self.spreadsheet)
|
71
|
-
|
72
|
-
|
71
|
+
context["task_instance"].xcom_push(key="spreadsheet_id", value=spreadsheet["spreadsheetId"])
|
72
|
+
context["task_instance"].xcom_push(key="spreadsheet_url", value=spreadsheet["spreadsheetUrl"])
|
73
73
|
return spreadsheet
|
@@ -23,7 +23,12 @@ from collections.abc import Sequence
|
|
23
23
|
from typing import TYPE_CHECKING
|
24
24
|
|
25
25
|
from airflow.providers.google.suite.hooks.drive import GoogleDriveHook
|
26
|
-
from airflow.
|
26
|
+
from airflow.providers.google.version_compat import AIRFLOW_V_3_0_PLUS
|
27
|
+
|
28
|
+
if AIRFLOW_V_3_0_PLUS:
|
29
|
+
from airflow.sdk import BaseSensorOperator
|
30
|
+
else:
|
31
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
27
32
|
|
28
33
|
if TYPE_CHECKING:
|
29
34
|
from airflow.utils.context import Context
|
@@ -24,9 +24,9 @@ from collections.abc import Sequence
|
|
24
24
|
from typing import TYPE_CHECKING
|
25
25
|
|
26
26
|
from airflow.exceptions import AirflowException
|
27
|
-
from airflow.models import BaseOperator
|
28
27
|
from airflow.providers.google.cloud.hooks.gcs import GCSHook
|
29
28
|
from airflow.providers.google.suite.hooks.drive import GoogleDriveHook
|
29
|
+
from airflow.providers.google.version_compat import BaseOperator
|
30
30
|
|
31
31
|
if TYPE_CHECKING:
|
32
32
|
from airflow.utils.context import Context
|
@@ -21,9 +21,9 @@ from collections.abc import Sequence
|
|
21
21
|
from tempfile import NamedTemporaryFile
|
22
22
|
from typing import Any
|
23
23
|
|
24
|
-
from airflow.models import BaseOperator
|
25
24
|
from airflow.providers.google.cloud.hooks.gcs import GCSHook
|
26
25
|
from airflow.providers.google.suite.hooks.sheets import GSheetsHook
|
26
|
+
from airflow.providers.google.version_compat import BaseOperator
|
27
27
|
|
28
28
|
|
29
29
|
class GCSToGoogleSheetsOperator(BaseOperator):
|
@@ -24,8 +24,8 @@ from pathlib import Path
|
|
24
24
|
from typing import TYPE_CHECKING
|
25
25
|
|
26
26
|
from airflow.exceptions import AirflowFailException
|
27
|
-
from airflow.models import BaseOperator
|
28
27
|
from airflow.providers.google.suite.hooks.drive import GoogleDriveHook
|
28
|
+
from airflow.providers.google.version_compat import BaseOperator
|
29
29
|
|
30
30
|
if TYPE_CHECKING:
|
31
31
|
from airflow.utils.context import Context
|
@@ -33,3 +33,31 @@ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
|
|
33
33
|
|
34
34
|
|
35
35
|
AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
|
36
|
+
AIRFLOW_V_3_1_PLUS = get_base_airflow_version_tuple() >= (3, 1, 0)
|
37
|
+
|
38
|
+
# Version-compatible imports
|
39
|
+
# BaseOperator: Use 3.1+ due to xcom_push method missing in SDK BaseOperator 3.0.x
|
40
|
+
# This is needed for DecoratedOperator compatibility
|
41
|
+
if AIRFLOW_V_3_1_PLUS:
|
42
|
+
from airflow.sdk import BaseOperator
|
43
|
+
else:
|
44
|
+
from airflow.models import BaseOperator
|
45
|
+
|
46
|
+
# Other SDK components: Available since 3.0+
|
47
|
+
if AIRFLOW_V_3_0_PLUS:
|
48
|
+
from airflow.sdk import (
|
49
|
+
BaseOperatorLink,
|
50
|
+
BaseSensorOperator,
|
51
|
+
)
|
52
|
+
else:
|
53
|
+
from airflow.models import BaseOperatorLink # type: ignore[no-redef]
|
54
|
+
from airflow.sensors.base import BaseSensorOperator # type: ignore[no-redef]
|
55
|
+
|
56
|
+
# Explicitly export these imports to protect them from being removed by linters
|
57
|
+
__all__ = [
|
58
|
+
"AIRFLOW_V_3_0_PLUS",
|
59
|
+
"AIRFLOW_V_3_1_PLUS",
|
60
|
+
"BaseOperator",
|
61
|
+
"BaseSensorOperator",
|
62
|
+
"BaseOperatorLink",
|
63
|
+
]
|
@@ -1,11 +1,11 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: apache-airflow-providers-google
|
3
|
-
Version: 16.0
|
3
|
+
Version: 16.1.0
|
4
4
|
Summary: Provider package apache-airflow-providers-google for Apache Airflow
|
5
5
|
Keywords: airflow-provider,google,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
7
7
|
Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
|
8
|
-
Requires-Python: ~=3.
|
8
|
+
Requires-Python: ~=3.10
|
9
9
|
Description-Content-Type: text/x-rst
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Environment :: Console
|
@@ -15,14 +15,13 @@ Classifier: Intended Audience :: System Administrators
|
|
15
15
|
Classifier: Framework :: Apache Airflow
|
16
16
|
Classifier: Framework :: Apache Airflow :: Provider
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
22
21
|
Classifier: Topic :: System :: Monitoring
|
23
|
-
Requires-Dist: apache-airflow>=2.10.
|
24
|
-
Requires-Dist: apache-airflow-providers-common-compat>=1.4.
|
25
|
-
Requires-Dist: apache-airflow-providers-common-sql>=1.27.
|
22
|
+
Requires-Dist: apache-airflow>=2.10.0
|
23
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.4.0
|
24
|
+
Requires-Dist: apache-airflow-providers-common-sql>=1.27.0
|
26
25
|
Requires-Dist: asgiref>=3.5.2
|
27
26
|
Requires-Dist: dill>=0.2.3
|
28
27
|
Requires-Dist: gcloud-aio-auth>=5.2.0
|
@@ -37,11 +36,11 @@ Requires-Dist: google-auth>=2.29.0
|
|
37
36
|
Requires-Dist: google-auth-httplib2>=0.0.1
|
38
37
|
Requires-Dist: google-cloud-aiplatform[evaluation, ray]>=1.73.0;python_version < '3.12'
|
39
38
|
Requires-Dist: google-cloud-aiplatform[evaluation]>=1.73.0;python_version >= '3.12'
|
40
|
-
Requires-Dist: ray[default]>=2.42.0 ; python_version >= '3.12'
|
39
|
+
Requires-Dist: ray[default]>=2.42.0 ; python_version >= '3.12' and python_version < '3.13'
|
41
40
|
Requires-Dist: google-cloud-bigquery-storage>=2.31.0; python_version >= '3.12'
|
42
41
|
Requires-Dist: google-cloud-alloydb>=0.4.0
|
43
42
|
Requires-Dist: google-cloud-automl>=2.12.0
|
44
|
-
Requires-Dist: google-cloud-bigquery>=3.
|
43
|
+
Requires-Dist: google-cloud-bigquery>=3.24.0
|
45
44
|
Requires-Dist: google-cloud-bigquery-datatransfer>=3.13.0
|
46
45
|
Requires-Dist: google-cloud-bigtable>=2.17.0
|
47
46
|
Requires-Dist: google-cloud-build>=3.31.0
|
@@ -65,7 +64,7 @@ Requires-Dist: google-cloud-os-login>=2.9.1
|
|
65
64
|
Requires-Dist: google-cloud-pubsub>=2.21.3
|
66
65
|
Requires-Dist: google-cloud-redis>=2.12.0
|
67
66
|
Requires-Dist: google-cloud-secret-manager>=2.16.0
|
68
|
-
Requires-Dist: google-cloud-spanner>=3.
|
67
|
+
Requires-Dist: google-cloud-spanner>=3.50.0
|
69
68
|
Requires-Dist: google-cloud-speech>=2.18.0
|
70
69
|
Requires-Dist: google-cloud-storage>=2.7.0
|
71
70
|
Requires-Dist: google-cloud-storage-transfer>=1.4.1
|
@@ -82,7 +81,7 @@ Requires-Dist: httpx>=0.25.0
|
|
82
81
|
Requires-Dist: looker-sdk>=22.4.0,!=24.18.0
|
83
82
|
Requires-Dist: pandas-gbq>=0.7.0
|
84
83
|
Requires-Dist: proto-plus>=1.19.6
|
85
|
-
Requires-Dist: pyarrow>=
|
84
|
+
Requires-Dist: pyarrow>=16.1.0
|
86
85
|
Requires-Dist: python-slugify>=7.0.0
|
87
86
|
Requires-Dist: PyOpenSSL>=23.0.0
|
88
87
|
Requires-Dist: sqlalchemy-bigquery>=1.2.1
|
@@ -90,20 +89,20 @@ Requires-Dist: sqlalchemy-spanner>=1.6.2
|
|
90
89
|
Requires-Dist: tenacity>=8.3.0
|
91
90
|
Requires-Dist: immutabledict>=4.2.0
|
92
91
|
Requires-Dist: types-protobuf!=5.29.1.20250402,>=5.27.0
|
93
|
-
Requires-Dist: apache-airflow-providers-amazon>=2.6.
|
92
|
+
Requires-Dist: apache-airflow-providers-amazon>=2.6.0 ; extra == "amazon"
|
94
93
|
Requires-Dist: apache-beam[gcp]>=2.53.0 ; extra == "apache-beam" and ( python_version < "3.12")
|
95
94
|
Requires-Dist: apache-beam[gcp]>=2.57.0 ; extra == "apache-beam" and ( python_version >= "3.12")
|
96
95
|
Requires-Dist: apache-airflow-providers-apache-cassandra ; extra == "apache-cassandra"
|
97
|
-
Requires-Dist: apache-airflow-providers-cncf-kubernetes>=10.1.
|
98
|
-
Requires-Dist: apache-airflow-providers-fab>=2.0.
|
99
|
-
Requires-Dist: apache-airflow-providers-facebook>=2.2.
|
96
|
+
Requires-Dist: apache-airflow-providers-cncf-kubernetes>=10.1.0 ; extra == "cncf-kubernetes"
|
97
|
+
Requires-Dist: apache-airflow-providers-fab>=2.0.0 ; extra == "fab"
|
98
|
+
Requires-Dist: apache-airflow-providers-facebook>=2.2.0 ; extra == "facebook"
|
100
99
|
Requires-Dist: apache-airflow-providers-http ; extra == "http"
|
101
100
|
Requires-Dist: plyvel>=1.5.1 ; extra == "leveldb"
|
102
101
|
Requires-Dist: apache-airflow-providers-microsoft-azure ; extra == "microsoft-azure"
|
103
102
|
Requires-Dist: apache-airflow-providers-microsoft-mssql ; extra == "microsoft-mssql"
|
104
103
|
Requires-Dist: apache-airflow-providers-mysql ; extra == "mysql"
|
105
104
|
Requires-Dist: apache-airflow-providers-openlineage ; extra == "openlineage"
|
106
|
-
Requires-Dist: apache-airflow-providers-oracle>=3.1.
|
105
|
+
Requires-Dist: apache-airflow-providers-oracle>=3.1.0 ; extra == "oracle"
|
107
106
|
Requires-Dist: apache-airflow-providers-postgres ; extra == "postgres"
|
108
107
|
Requires-Dist: apache-airflow-providers-presto ; extra == "presto"
|
109
108
|
Requires-Dist: apache-airflow-providers-salesforce ; extra == "salesforce"
|
@@ -111,8 +110,8 @@ Requires-Dist: apache-airflow-providers-sftp ; extra == "sftp"
|
|
111
110
|
Requires-Dist: apache-airflow-providers-ssh ; extra == "ssh"
|
112
111
|
Requires-Dist: apache-airflow-providers-trino ; extra == "trino"
|
113
112
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
114
|
-
Project-URL: Changelog, https://airflow.
|
115
|
-
Project-URL: Documentation, https://airflow.
|
113
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-google/16.1.0/changelog.html
|
114
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-google/16.1.0
|
116
115
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
117
116
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
118
117
|
Project-URL: Source Code, https://github.com/apache/airflow
|
@@ -162,7 +161,7 @@ Provides-Extra: trino
|
|
162
161
|
|
163
162
|
Package ``apache-airflow-providers-google``
|
164
163
|
|
165
|
-
Release: ``16.
|
164
|
+
Release: ``16.1.0``
|
166
165
|
|
167
166
|
|
168
167
|
Google services including:
|
@@ -182,7 +181,7 @@ This is a provider package for ``google`` provider. All classes for this provide
|
|
182
181
|
are in ``airflow.providers.google`` python package.
|
183
182
|
|
184
183
|
You can find package information and changelog for the provider
|
185
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-google/16.
|
184
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-google/16.1.0/>`_.
|
186
185
|
|
187
186
|
Installation
|
188
187
|
------------
|
@@ -191,14 +190,14 @@ You can install this package on top of an existing Airflow 2 installation (see `
|
|
191
190
|
for the minimum Airflow version supported) via
|
192
191
|
``pip install apache-airflow-providers-google``
|
193
192
|
|
194
|
-
The package supports the following python versions: 3.
|
193
|
+
The package supports the following python versions: 3.10,3.11,3.12
|
195
194
|
|
196
195
|
Requirements
|
197
196
|
------------
|
198
197
|
|
199
|
-
===========================================
|
198
|
+
=========================================== ==================================================================
|
200
199
|
PIP package Version required
|
201
|
-
===========================================
|
200
|
+
=========================================== ==================================================================
|
202
201
|
``apache-airflow`` ``>=2.10.0``
|
203
202
|
``apache-airflow-providers-common-compat`` ``>=1.4.0``
|
204
203
|
``apache-airflow-providers-common-sql`` ``>=1.27.0``
|
@@ -216,11 +215,11 @@ PIP package Version required
|
|
216
215
|
``google-auth-httplib2`` ``>=0.0.1``
|
217
216
|
``google-cloud-aiplatform[evaluation,ray]`` ``>=1.73.0; python_version < "3.12"``
|
218
217
|
``google-cloud-aiplatform[evaluation]`` ``>=1.73.0; python_version >= "3.12"``
|
219
|
-
``ray[default]`` ``>=2.42.0; python_version >= "3.12"``
|
218
|
+
``ray[default]`` ``>=2.42.0; python_version >= "3.12" and python_version < "3.13"``
|
220
219
|
``google-cloud-bigquery-storage`` ``>=2.31.0; python_version >= "3.12"``
|
221
220
|
``google-cloud-alloydb`` ``>=0.4.0``
|
222
221
|
``google-cloud-automl`` ``>=2.12.0``
|
223
|
-
``google-cloud-bigquery``
|
222
|
+
``google-cloud-bigquery`` ``>=3.24.0``
|
224
223
|
``google-cloud-bigquery-datatransfer`` ``>=3.13.0``
|
225
224
|
``google-cloud-bigtable`` ``>=2.17.0``
|
226
225
|
``google-cloud-build`` ``>=3.31.0``
|
@@ -244,7 +243,7 @@ PIP package Version required
|
|
244
243
|
``google-cloud-pubsub`` ``>=2.21.3``
|
245
244
|
``google-cloud-redis`` ``>=2.12.0``
|
246
245
|
``google-cloud-secret-manager`` ``>=2.16.0``
|
247
|
-
``google-cloud-spanner`` ``>=3.
|
246
|
+
``google-cloud-spanner`` ``>=3.50.0``
|
248
247
|
``google-cloud-speech`` ``>=2.18.0``
|
249
248
|
``google-cloud-storage`` ``>=2.7.0``
|
250
249
|
``google-cloud-storage-transfer`` ``>=1.4.1``
|
@@ -261,7 +260,7 @@ PIP package Version required
|
|
261
260
|
``looker-sdk`` ``>=22.4.0,!=24.18.0``
|
262
261
|
``pandas-gbq`` ``>=0.7.0``
|
263
262
|
``proto-plus`` ``>=1.19.6``
|
264
|
-
``pyarrow`` ``>=
|
263
|
+
``pyarrow`` ``>=16.1.0``
|
265
264
|
``python-slugify`` ``>=7.0.0``
|
266
265
|
``PyOpenSSL`` ``>=23.0.0``
|
267
266
|
``sqlalchemy-bigquery`` ``>=1.2.1``
|
@@ -269,7 +268,7 @@ PIP package Version required
|
|
269
268
|
``tenacity`` ``>=8.3.0``
|
270
269
|
``immutabledict`` ``>=4.2.0``
|
271
270
|
``types-protobuf`` ``>=5.27.0,!=5.29.1.20250402``
|
272
|
-
===========================================
|
271
|
+
=========================================== ==================================================================
|
273
272
|
|
274
273
|
Cross provider package dependencies
|
275
274
|
-----------------------------------
|
@@ -309,5 +308,5 @@ Dependent package
|
|
309
308
|
======================================================================================================================== ====================
|
310
309
|
|
311
310
|
The changelog for the provider package can be found in the
|
312
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-google/16.
|
311
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-google/16.1.0/changelog.html>`_.
|
313
312
|
|