apache-airflow-providers-google 14.0.0__py3-none-any.whl → 19.1.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/3rd-party-licenses/LICENSES.txt +14 -0
- airflow/providers/google/3rd-party-licenses/NOTICE +5 -0
- airflow/providers/google/__init__.py +3 -3
- airflow/providers/google/_vendor/__init__.py +0 -0
- airflow/providers/google/_vendor/json_merge_patch.py +91 -0
- airflow/providers/google/ads/hooks/ads.py +52 -43
- airflow/providers/google/ads/operators/ads.py +2 -2
- airflow/providers/google/ads/transfers/ads_to_gcs.py +3 -19
- airflow/providers/google/assets/gcs.py +1 -11
- airflow/providers/google/cloud/_internal_client/secret_manager_client.py +3 -2
- airflow/providers/google/cloud/bundles/gcs.py +161 -0
- airflow/providers/google/cloud/hooks/alloy_db.py +2 -3
- airflow/providers/google/cloud/hooks/bigquery.py +195 -318
- airflow/providers/google/cloud/hooks/bigquery_dts.py +8 -8
- airflow/providers/google/cloud/hooks/bigtable.py +3 -2
- airflow/providers/google/cloud/hooks/cloud_batch.py +8 -9
- airflow/providers/google/cloud/hooks/cloud_build.py +6 -65
- airflow/providers/google/cloud/hooks/cloud_composer.py +292 -24
- airflow/providers/google/cloud/hooks/cloud_logging.py +109 -0
- airflow/providers/google/cloud/hooks/cloud_memorystore.py +4 -3
- airflow/providers/google/cloud/hooks/cloud_run.py +20 -11
- airflow/providers/google/cloud/hooks/cloud_sql.py +136 -64
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +35 -15
- airflow/providers/google/cloud/hooks/compute.py +7 -6
- airflow/providers/google/cloud/hooks/compute_ssh.py +7 -4
- airflow/providers/google/cloud/hooks/datacatalog.py +12 -3
- airflow/providers/google/cloud/hooks/dataflow.py +87 -242
- airflow/providers/google/cloud/hooks/dataform.py +9 -14
- airflow/providers/google/cloud/hooks/datafusion.py +7 -9
- airflow/providers/google/cloud/hooks/dataplex.py +13 -12
- airflow/providers/google/cloud/hooks/dataprep.py +2 -2
- airflow/providers/google/cloud/hooks/dataproc.py +76 -74
- airflow/providers/google/cloud/hooks/dataproc_metastore.py +4 -3
- airflow/providers/google/cloud/hooks/dlp.py +5 -4
- airflow/providers/google/cloud/hooks/gcs.py +144 -33
- airflow/providers/google/cloud/hooks/gen_ai.py +196 -0
- airflow/providers/google/cloud/hooks/kms.py +3 -2
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +22 -17
- airflow/providers/google/cloud/hooks/looker.py +6 -1
- airflow/providers/google/cloud/hooks/managed_kafka.py +227 -3
- airflow/providers/google/cloud/hooks/mlengine.py +7 -8
- airflow/providers/google/cloud/hooks/natural_language.py +3 -2
- airflow/providers/google/cloud/hooks/os_login.py +3 -2
- airflow/providers/google/cloud/hooks/pubsub.py +6 -6
- airflow/providers/google/cloud/hooks/secret_manager.py +105 -12
- airflow/providers/google/cloud/hooks/spanner.py +75 -10
- airflow/providers/google/cloud/hooks/speech_to_text.py +3 -2
- airflow/providers/google/cloud/hooks/stackdriver.py +18 -18
- airflow/providers/google/cloud/hooks/tasks.py +4 -3
- airflow/providers/google/cloud/hooks/text_to_speech.py +3 -2
- airflow/providers/google/cloud/hooks/translate.py +8 -17
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +8 -222
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +9 -15
- airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +33 -283
- airflow/providers/google/cloud/hooks/vertex_ai/dataset.py +5 -12
- airflow/providers/google/cloud/hooks/vertex_ai/endpoint_service.py +6 -12
- airflow/providers/google/cloud/hooks/vertex_ai/experiment_service.py +202 -0
- airflow/providers/google/cloud/hooks/vertex_ai/feature_store.py +311 -10
- airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +79 -75
- airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +7 -13
- airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +8 -12
- airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py +6 -12
- airflow/providers/google/cloud/hooks/vertex_ai/prediction_service.py +3 -2
- airflow/providers/google/cloud/hooks/vertex_ai/ray.py +223 -0
- airflow/providers/google/cloud/hooks/video_intelligence.py +3 -2
- airflow/providers/google/cloud/hooks/vision.py +7 -7
- airflow/providers/google/cloud/hooks/workflows.py +4 -3
- airflow/providers/google/cloud/links/alloy_db.py +0 -46
- airflow/providers/google/cloud/links/base.py +77 -7
- 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/{life_sciences.py → cloud_run.py} +5 -27
- airflow/providers/google/cloud/links/cloud_sql.py +0 -33
- airflow/providers/google/cloud/links/cloud_storage_transfer.py +17 -46
- airflow/providers/google/cloud/links/cloud_tasks.py +7 -26
- 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 -90
- 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 +11 -89
- airflow/providers/google/cloud/links/datastore.py +0 -31
- airflow/providers/google/cloud/links/kubernetes_engine.py +11 -61
- airflow/providers/google/cloud/links/managed_kafka.py +11 -51
- 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 +17 -187
- airflow/providers/google/cloud/links/vertex_ai.py +28 -195
- airflow/providers/google/cloud/links/workflows.py +0 -52
- airflow/providers/google/cloud/log/gcs_task_handler.py +166 -118
- airflow/providers/google/cloud/log/stackdriver_task_handler.py +14 -9
- airflow/providers/google/cloud/openlineage/CloudStorageTransferJobFacet.json +68 -0
- airflow/providers/google/cloud/openlineage/CloudStorageTransferRunFacet.json +60 -0
- airflow/providers/google/cloud/openlineage/DataFusionRunFacet.json +32 -0
- airflow/providers/google/cloud/openlineage/facets.py +141 -40
- airflow/providers/google/cloud/openlineage/mixins.py +14 -13
- airflow/providers/google/cloud/openlineage/utils.py +19 -3
- airflow/providers/google/cloud/operators/alloy_db.py +76 -61
- airflow/providers/google/cloud/operators/bigquery.py +104 -667
- airflow/providers/google/cloud/operators/bigquery_dts.py +12 -12
- airflow/providers/google/cloud/operators/bigtable.py +38 -7
- airflow/providers/google/cloud/operators/cloud_base.py +22 -1
- airflow/providers/google/cloud/operators/cloud_batch.py +18 -18
- airflow/providers/google/cloud/operators/cloud_build.py +80 -36
- airflow/providers/google/cloud/operators/cloud_composer.py +157 -71
- airflow/providers/google/cloud/operators/cloud_logging_sink.py +341 -0
- airflow/providers/google/cloud/operators/cloud_memorystore.py +74 -46
- airflow/providers/google/cloud/operators/cloud_run.py +39 -20
- airflow/providers/google/cloud/operators/cloud_sql.py +46 -61
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +92 -14
- airflow/providers/google/cloud/operators/compute.py +18 -50
- airflow/providers/google/cloud/operators/datacatalog.py +167 -29
- airflow/providers/google/cloud/operators/dataflow.py +38 -15
- airflow/providers/google/cloud/operators/dataform.py +19 -7
- airflow/providers/google/cloud/operators/datafusion.py +43 -43
- airflow/providers/google/cloud/operators/dataplex.py +212 -126
- airflow/providers/google/cloud/operators/dataprep.py +1 -5
- airflow/providers/google/cloud/operators/dataproc.py +134 -207
- airflow/providers/google/cloud/operators/dataproc_metastore.py +102 -84
- airflow/providers/google/cloud/operators/datastore.py +22 -6
- airflow/providers/google/cloud/operators/dlp.py +24 -45
- airflow/providers/google/cloud/operators/functions.py +21 -14
- airflow/providers/google/cloud/operators/gcs.py +15 -12
- airflow/providers/google/cloud/operators/gen_ai.py +389 -0
- airflow/providers/google/cloud/operators/kubernetes_engine.py +115 -106
- airflow/providers/google/cloud/operators/looker.py +1 -1
- airflow/providers/google/cloud/operators/managed_kafka.py +362 -40
- airflow/providers/google/cloud/operators/natural_language.py +5 -3
- airflow/providers/google/cloud/operators/pubsub.py +69 -21
- airflow/providers/google/cloud/operators/spanner.py +53 -45
- airflow/providers/google/cloud/operators/speech_to_text.py +5 -4
- airflow/providers/google/cloud/operators/stackdriver.py +5 -11
- airflow/providers/google/cloud/operators/tasks.py +6 -15
- airflow/providers/google/cloud/operators/text_to_speech.py +4 -3
- airflow/providers/google/cloud/operators/translate.py +46 -20
- airflow/providers/google/cloud/operators/translate_speech.py +4 -3
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +44 -34
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +34 -12
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +62 -53
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +75 -11
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +48 -12
- airflow/providers/google/cloud/operators/vertex_ai/experiment_service.py +435 -0
- airflow/providers/google/cloud/operators/vertex_ai/feature_store.py +532 -1
- airflow/providers/google/cloud/operators/vertex_ai/generative_model.py +135 -116
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +16 -12
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +62 -14
- airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +35 -10
- airflow/providers/google/cloud/operators/vertex_ai/ray.py +393 -0
- airflow/providers/google/cloud/operators/video_intelligence.py +5 -3
- airflow/providers/google/cloud/operators/vision.py +7 -5
- airflow/providers/google/cloud/operators/workflows.py +24 -19
- airflow/providers/google/cloud/secrets/secret_manager.py +2 -1
- airflow/providers/google/cloud/sensors/bigquery.py +2 -2
- airflow/providers/google/cloud/sensors/bigquery_dts.py +6 -4
- airflow/providers/google/cloud/sensors/bigtable.py +14 -6
- airflow/providers/google/cloud/sensors/cloud_composer.py +535 -33
- airflow/providers/google/cloud/sensors/cloud_storage_transfer_service.py +6 -5
- airflow/providers/google/cloud/sensors/dataflow.py +27 -10
- airflow/providers/google/cloud/sensors/dataform.py +2 -2
- airflow/providers/google/cloud/sensors/datafusion.py +4 -4
- airflow/providers/google/cloud/sensors/dataplex.py +7 -5
- airflow/providers/google/cloud/sensors/dataprep.py +2 -2
- airflow/providers/google/cloud/sensors/dataproc.py +10 -9
- airflow/providers/google/cloud/sensors/dataproc_metastore.py +4 -3
- airflow/providers/google/cloud/sensors/gcs.py +22 -21
- airflow/providers/google/cloud/sensors/looker.py +5 -5
- airflow/providers/google/cloud/sensors/pubsub.py +20 -20
- airflow/providers/google/cloud/sensors/tasks.py +2 -2
- airflow/providers/google/cloud/sensors/vertex_ai/feature_store.py +2 -2
- airflow/providers/google/cloud/sensors/workflows.py +6 -4
- airflow/providers/google/cloud/transfers/adls_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/azure_blob_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/azure_fileshare_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +11 -8
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +14 -13
- airflow/providers/google/cloud/transfers/bigquery_to_mssql.py +7 -3
- airflow/providers/google/cloud/transfers/bigquery_to_mysql.py +12 -1
- airflow/providers/google/cloud/transfers/bigquery_to_postgres.py +24 -10
- airflow/providers/google/cloud/transfers/bigquery_to_sql.py +104 -5
- airflow/providers/google/cloud/transfers/calendar_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/cassandra_to_gcs.py +18 -22
- airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +4 -5
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +45 -38
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/gcs_to_local.py +5 -3
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +10 -4
- airflow/providers/google/cloud/transfers/gdrive_to_gcs.py +6 -2
- airflow/providers/google/cloud/transfers/gdrive_to_local.py +2 -2
- airflow/providers/google/cloud/transfers/http_to_gcs.py +193 -0
- airflow/providers/google/cloud/transfers/local_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/mssql_to_gcs.py +1 -1
- airflow/providers/google/cloud/transfers/oracle_to_gcs.py +36 -11
- airflow/providers/google/cloud/transfers/postgres_to_gcs.py +44 -12
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +12 -6
- airflow/providers/google/cloud/transfers/salesforce_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +36 -14
- airflow/providers/google/cloud/transfers/sheets_to_gcs.py +3 -3
- airflow/providers/google/cloud/transfers/sql_to_gcs.py +10 -10
- airflow/providers/google/cloud/triggers/bigquery.py +75 -34
- airflow/providers/google/cloud/triggers/bigquery_dts.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_batch.py +2 -1
- airflow/providers/google/cloud/triggers/cloud_build.py +3 -2
- airflow/providers/google/cloud/triggers/cloud_composer.py +303 -47
- airflow/providers/google/cloud/triggers/cloud_run.py +2 -2
- airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py +96 -5
- airflow/providers/google/cloud/triggers/dataflow.py +125 -2
- airflow/providers/google/cloud/triggers/datafusion.py +1 -1
- airflow/providers/google/cloud/triggers/dataplex.py +16 -3
- airflow/providers/google/cloud/triggers/dataproc.py +124 -53
- airflow/providers/google/cloud/triggers/kubernetes_engine.py +46 -28
- airflow/providers/google/cloud/triggers/mlengine.py +1 -1
- airflow/providers/google/cloud/triggers/pubsub.py +17 -20
- airflow/providers/google/cloud/triggers/vertex_ai.py +8 -7
- airflow/providers/google/cloud/utils/bigquery.py +5 -7
- airflow/providers/google/cloud/utils/bigquery_get_data.py +1 -1
- airflow/providers/google/cloud/utils/credentials_provider.py +4 -3
- airflow/providers/google/cloud/utils/dataform.py +1 -1
- airflow/providers/google/cloud/utils/external_token_supplier.py +0 -1
- airflow/providers/google/cloud/utils/field_validator.py +1 -2
- airflow/providers/google/cloud/utils/validators.py +43 -0
- airflow/providers/google/common/auth_backend/google_openid.py +26 -9
- airflow/providers/google/common/consts.py +2 -1
- airflow/providers/google/common/deprecated.py +2 -1
- airflow/providers/google/common/hooks/base_google.py +40 -43
- airflow/providers/google/common/hooks/operation_helpers.py +78 -0
- airflow/providers/google/common/links/storage.py +0 -22
- airflow/providers/google/common/utils/get_secret.py +31 -0
- airflow/providers/google/common/utils/id_token_credentials.py +4 -5
- airflow/providers/google/firebase/operators/firestore.py +2 -2
- airflow/providers/google/get_provider_info.py +61 -216
- airflow/providers/google/go_module_utils.py +35 -3
- airflow/providers/google/leveldb/hooks/leveldb.py +30 -6
- airflow/providers/google/leveldb/operators/leveldb.py +2 -2
- airflow/providers/google/marketing_platform/hooks/analytics_admin.py +3 -2
- airflow/providers/google/marketing_platform/hooks/display_video.py +3 -109
- airflow/providers/google/marketing_platform/hooks/search_ads.py +1 -1
- airflow/providers/google/marketing_platform/links/analytics_admin.py +4 -5
- airflow/providers/google/marketing_platform/operators/analytics_admin.py +7 -6
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +5 -5
- airflow/providers/google/marketing_platform/operators/display_video.py +28 -489
- airflow/providers/google/marketing_platform/operators/search_ads.py +2 -2
- airflow/providers/google/marketing_platform/sensors/campaign_manager.py +2 -2
- airflow/providers/google/marketing_platform/sensors/display_video.py +4 -64
- airflow/providers/google/suite/hooks/calendar.py +1 -1
- airflow/providers/google/suite/hooks/drive.py +2 -2
- airflow/providers/google/suite/hooks/sheets.py +15 -1
- airflow/providers/google/suite/operators/sheets.py +8 -3
- airflow/providers/google/suite/sensors/drive.py +2 -2
- airflow/providers/google/suite/transfers/gcs_to_gdrive.py +2 -2
- airflow/providers/google/suite/transfers/gcs_to_sheets.py +1 -1
- airflow/providers/google/suite/transfers/local_to_drive.py +3 -3
- airflow/providers/google/suite/transfers/sql_to_sheets.py +5 -4
- airflow/providers/google/version_compat.py +15 -1
- {apache_airflow_providers_google-14.0.0.dist-info → apache_airflow_providers_google-19.1.0rc1.dist-info}/METADATA +117 -72
- apache_airflow_providers_google-19.1.0rc1.dist-info/RECORD +331 -0
- {apache_airflow_providers_google-14.0.0.dist-info → apache_airflow_providers_google-19.1.0rc1.dist-info}/WHEEL +1 -1
- apache_airflow_providers_google-19.1.0rc1.dist-info/licenses/NOTICE +5 -0
- airflow/providers/google/cloud/example_dags/example_cloud_task.py +0 -54
- airflow/providers/google/cloud/hooks/automl.py +0 -679
- airflow/providers/google/cloud/hooks/life_sciences.py +0 -159
- airflow/providers/google/cloud/links/automl.py +0 -193
- airflow/providers/google/cloud/operators/automl.py +0 -1360
- airflow/providers/google/cloud/operators/life_sciences.py +0 -119
- airflow/providers/google/cloud/operators/mlengine.py +0 -1515
- airflow/providers/google/cloud/utils/mlengine_operator_utils.py +0 -273
- apache_airflow_providers_google-14.0.0.dist-info/RECORD +0 -318
- /airflow/providers/google/cloud/{example_dags → bundles}/__init__.py +0 -0
- {apache_airflow_providers_google-14.0.0.dist-info → apache_airflow_providers_google-19.1.0rc1.dist-info}/entry_points.txt +0 -0
- {airflow/providers/google → apache_airflow_providers_google-19.1.0rc1.dist-info/licenses}/LICENSE +0 -0
|
@@ -19,14 +19,6 @@ from __future__ import annotations
|
|
|
19
19
|
from collections.abc import Sequence
|
|
20
20
|
from typing import TYPE_CHECKING
|
|
21
21
|
|
|
22
|
-
from airflow.providers.google.cloud.hooks.datacatalog import CloudDataCatalogHook
|
|
23
|
-
from airflow.providers.google.cloud.links.datacatalog import (
|
|
24
|
-
DataCatalogEntryGroupLink,
|
|
25
|
-
DataCatalogEntryLink,
|
|
26
|
-
DataCatalogTagTemplateLink,
|
|
27
|
-
)
|
|
28
|
-
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
|
|
29
|
-
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
|
|
30
22
|
from google.api_core.exceptions import AlreadyExists, NotFound
|
|
31
23
|
from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
|
|
32
24
|
from google.cloud.datacatalog import (
|
|
@@ -40,12 +32,31 @@ from google.cloud.datacatalog import (
|
|
|
40
32
|
TagTemplateField,
|
|
41
33
|
)
|
|
42
34
|
|
|
35
|
+
from airflow.exceptions import AirflowProviderDeprecationWarning
|
|
36
|
+
from airflow.providers.google.cloud.hooks.datacatalog import CloudDataCatalogHook
|
|
37
|
+
from airflow.providers.google.cloud.links.datacatalog import (
|
|
38
|
+
DataCatalogEntryGroupLink,
|
|
39
|
+
DataCatalogEntryLink,
|
|
40
|
+
DataCatalogTagTemplateLink,
|
|
41
|
+
)
|
|
42
|
+
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
|
|
43
|
+
from airflow.providers.google.common.deprecated import deprecated
|
|
44
|
+
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
|
|
45
|
+
|
|
43
46
|
if TYPE_CHECKING:
|
|
44
|
-
from airflow.utils.context import Context
|
|
45
47
|
from google.api_core.retry import Retry
|
|
46
48
|
from google.protobuf.field_mask_pb2 import FieldMask
|
|
47
49
|
|
|
50
|
+
from airflow.providers.common.compat.sdk import Context
|
|
51
|
+
|
|
48
52
|
|
|
53
|
+
@deprecated(
|
|
54
|
+
planned_removal_date="January 30, 2026",
|
|
55
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogCreateEntryOperator",
|
|
56
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
57
|
+
"in favor of Dataplex Universal Catalog.",
|
|
58
|
+
category=AirflowProviderDeprecationWarning,
|
|
59
|
+
)
|
|
49
60
|
class CloudDataCatalogCreateEntryOperator(GoogleCloudBaseOperator):
|
|
50
61
|
"""
|
|
51
62
|
Creates an entry.
|
|
@@ -152,10 +163,9 @@ class CloudDataCatalogCreateEntryOperator(GoogleCloudBaseOperator):
|
|
|
152
163
|
)
|
|
153
164
|
_, _, entry_id = result.name.rpartition("/")
|
|
154
165
|
self.log.info("Current entry_id ID: %s", entry_id)
|
|
155
|
-
|
|
166
|
+
context["ti"].xcom_push(key="entry_id", value=entry_id)
|
|
156
167
|
DataCatalogEntryLink.persist(
|
|
157
168
|
context=context,
|
|
158
|
-
task_instance=self,
|
|
159
169
|
entry_id=self.entry_id,
|
|
160
170
|
entry_group_id=self.entry_group,
|
|
161
171
|
location_id=self.location,
|
|
@@ -164,6 +174,13 @@ class CloudDataCatalogCreateEntryOperator(GoogleCloudBaseOperator):
|
|
|
164
174
|
return Entry.to_dict(result)
|
|
165
175
|
|
|
166
176
|
|
|
177
|
+
@deprecated(
|
|
178
|
+
planned_removal_date="January 30, 2026",
|
|
179
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogCreateEntryGroupOperator",
|
|
180
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
181
|
+
"in favor of Dataplex Universal Catalog.",
|
|
182
|
+
category=AirflowProviderDeprecationWarning,
|
|
183
|
+
)
|
|
167
184
|
class CloudDataCatalogCreateEntryGroupOperator(GoogleCloudBaseOperator):
|
|
168
185
|
"""
|
|
169
186
|
Creates an EntryGroup.
|
|
@@ -266,10 +283,9 @@ class CloudDataCatalogCreateEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
266
283
|
|
|
267
284
|
_, _, entry_group_id = result.name.rpartition("/")
|
|
268
285
|
self.log.info("Current entry group ID: %s", entry_group_id)
|
|
269
|
-
|
|
286
|
+
context["ti"].xcom_push(key="entry_group_id", value=entry_group_id)
|
|
270
287
|
DataCatalogEntryGroupLink.persist(
|
|
271
288
|
context=context,
|
|
272
|
-
task_instance=self,
|
|
273
289
|
entry_group_id=self.entry_group_id,
|
|
274
290
|
location_id=self.location,
|
|
275
291
|
project_id=self.project_id or hook.project_id,
|
|
@@ -277,6 +293,14 @@ class CloudDataCatalogCreateEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
277
293
|
return EntryGroup.to_dict(result)
|
|
278
294
|
|
|
279
295
|
|
|
296
|
+
@deprecated(
|
|
297
|
+
planned_removal_date="January 30, 2026",
|
|
298
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogCreateEntryOperator, "
|
|
299
|
+
"airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateEntryOperator",
|
|
300
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
301
|
+
"in favor of Dataplex Universal Catalog.",
|
|
302
|
+
category=AirflowProviderDeprecationWarning,
|
|
303
|
+
)
|
|
280
304
|
class CloudDataCatalogCreateTagOperator(GoogleCloudBaseOperator):
|
|
281
305
|
"""
|
|
282
306
|
Creates a tag on an entry.
|
|
@@ -401,10 +425,9 @@ class CloudDataCatalogCreateTagOperator(GoogleCloudBaseOperator):
|
|
|
401
425
|
|
|
402
426
|
_, _, tag_id = tag.name.rpartition("/")
|
|
403
427
|
self.log.info("Current Tag ID: %s", tag_id)
|
|
404
|
-
|
|
428
|
+
context["ti"].xcom_push(key="tag_id", value=tag_id)
|
|
405
429
|
DataCatalogEntryLink.persist(
|
|
406
430
|
context=context,
|
|
407
|
-
task_instance=self,
|
|
408
431
|
entry_id=self.entry,
|
|
409
432
|
entry_group_id=self.entry_group,
|
|
410
433
|
location_id=self.location,
|
|
@@ -413,6 +436,13 @@ class CloudDataCatalogCreateTagOperator(GoogleCloudBaseOperator):
|
|
|
413
436
|
return Tag.to_dict(tag)
|
|
414
437
|
|
|
415
438
|
|
|
439
|
+
@deprecated(
|
|
440
|
+
planned_removal_date="January 30, 2026",
|
|
441
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogCreateAspectTypeOperator",
|
|
442
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
443
|
+
"in favor of Dataplex Universal Catalog.",
|
|
444
|
+
category=AirflowProviderDeprecationWarning,
|
|
445
|
+
)
|
|
416
446
|
class CloudDataCatalogCreateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
417
447
|
"""
|
|
418
448
|
Creates a tag template.
|
|
@@ -512,10 +542,9 @@ class CloudDataCatalogCreateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
512
542
|
)
|
|
513
543
|
_, _, tag_template = result.name.rpartition("/")
|
|
514
544
|
self.log.info("Current Tag ID: %s", tag_template)
|
|
515
|
-
|
|
545
|
+
context["ti"].xcom_push(key="tag_template_id", value=tag_template)
|
|
516
546
|
DataCatalogTagTemplateLink.persist(
|
|
517
547
|
context=context,
|
|
518
|
-
task_instance=self,
|
|
519
548
|
tag_template_id=self.tag_template_id,
|
|
520
549
|
location_id=self.location,
|
|
521
550
|
project_id=self.project_id or hook.project_id,
|
|
@@ -523,6 +552,14 @@ class CloudDataCatalogCreateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
523
552
|
return TagTemplate.to_dict(result)
|
|
524
553
|
|
|
525
554
|
|
|
555
|
+
@deprecated(
|
|
556
|
+
planned_removal_date="January 30, 2026",
|
|
557
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateAspectTypeOperator, "
|
|
558
|
+
"airflow.providers.google.cloud.operators.dataplex.DataplexCatalogCreateAspectTypeOperator",
|
|
559
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
560
|
+
"in favor of Dataplex Universal Catalog.",
|
|
561
|
+
category=AirflowProviderDeprecationWarning,
|
|
562
|
+
)
|
|
526
563
|
class CloudDataCatalogCreateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
527
564
|
r"""
|
|
528
565
|
Creates a field in a tag template.
|
|
@@ -631,10 +668,9 @@ class CloudDataCatalogCreateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
631
668
|
result = tag_template.fields[self.tag_template_field_id]
|
|
632
669
|
|
|
633
670
|
self.log.info("Current Tag ID: %s", self.tag_template_field_id)
|
|
634
|
-
|
|
671
|
+
context["ti"].xcom_push(key="tag_template_field_id", value=self.tag_template_field_id)
|
|
635
672
|
DataCatalogTagTemplateLink.persist(
|
|
636
673
|
context=context,
|
|
637
|
-
task_instance=self,
|
|
638
674
|
tag_template_id=self.tag_template,
|
|
639
675
|
location_id=self.location,
|
|
640
676
|
project_id=self.project_id or hook.project_id,
|
|
@@ -642,6 +678,13 @@ class CloudDataCatalogCreateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
642
678
|
return TagTemplateField.to_dict(result)
|
|
643
679
|
|
|
644
680
|
|
|
681
|
+
@deprecated(
|
|
682
|
+
planned_removal_date="January 30, 2026",
|
|
683
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogDeleteEntryOperator",
|
|
684
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
685
|
+
"in favor of Dataplex Universal Catalog.",
|
|
686
|
+
category=AirflowProviderDeprecationWarning,
|
|
687
|
+
)
|
|
645
688
|
class CloudDataCatalogDeleteEntryOperator(GoogleCloudBaseOperator):
|
|
646
689
|
"""
|
|
647
690
|
Deletes an existing entry.
|
|
@@ -727,6 +770,13 @@ class CloudDataCatalogDeleteEntryOperator(GoogleCloudBaseOperator):
|
|
|
727
770
|
self.log.info("Entry doesn't exists. Skipping.")
|
|
728
771
|
|
|
729
772
|
|
|
773
|
+
@deprecated(
|
|
774
|
+
planned_removal_date="January 30, 2026",
|
|
775
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogDeleteEntryGroupOperator",
|
|
776
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
777
|
+
"in favor of Dataplex Universal Catalog.",
|
|
778
|
+
category=AirflowProviderDeprecationWarning,
|
|
779
|
+
)
|
|
730
780
|
class CloudDataCatalogDeleteEntryGroupOperator(GoogleCloudBaseOperator):
|
|
731
781
|
"""
|
|
732
782
|
Deletes an EntryGroup.
|
|
@@ -809,6 +859,13 @@ class CloudDataCatalogDeleteEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
809
859
|
self.log.info("Entry doesn't exists. skipping")
|
|
810
860
|
|
|
811
861
|
|
|
862
|
+
@deprecated(
|
|
863
|
+
planned_removal_date="January 30, 2026",
|
|
864
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateEntryOperator",
|
|
865
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
866
|
+
"in favor of Dataplex Universal Catalog.",
|
|
867
|
+
category=AirflowProviderDeprecationWarning,
|
|
868
|
+
)
|
|
812
869
|
class CloudDataCatalogDeleteTagOperator(GoogleCloudBaseOperator):
|
|
813
870
|
"""
|
|
814
871
|
Deletes a tag.
|
|
@@ -899,6 +956,13 @@ class CloudDataCatalogDeleteTagOperator(GoogleCloudBaseOperator):
|
|
|
899
956
|
self.log.info("Entry doesn't exists. skipping")
|
|
900
957
|
|
|
901
958
|
|
|
959
|
+
@deprecated(
|
|
960
|
+
planned_removal_date="January 30, 2026",
|
|
961
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogDeleteAspectTypeOperator",
|
|
962
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
963
|
+
"in favor of Dataplex Universal Catalog.",
|
|
964
|
+
category=AirflowProviderDeprecationWarning,
|
|
965
|
+
)
|
|
902
966
|
class CloudDataCatalogDeleteTagTemplateOperator(GoogleCloudBaseOperator):
|
|
903
967
|
"""
|
|
904
968
|
Deletes a tag template and all tags using the template.
|
|
@@ -986,6 +1050,13 @@ class CloudDataCatalogDeleteTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
986
1050
|
self.log.info("Tag Template doesn't exists. skipping")
|
|
987
1051
|
|
|
988
1052
|
|
|
1053
|
+
@deprecated(
|
|
1054
|
+
planned_removal_date="January 30, 2026",
|
|
1055
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateAspectTypeOperator",
|
|
1056
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1057
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1058
|
+
category=AirflowProviderDeprecationWarning,
|
|
1059
|
+
)
|
|
989
1060
|
class CloudDataCatalogDeleteTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
990
1061
|
"""
|
|
991
1062
|
Deletes a field in a tag template and all uses of that field.
|
|
@@ -1076,6 +1147,13 @@ class CloudDataCatalogDeleteTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
1076
1147
|
self.log.info("Tag Template field doesn't exists. skipping")
|
|
1077
1148
|
|
|
1078
1149
|
|
|
1150
|
+
@deprecated(
|
|
1151
|
+
planned_removal_date="January 30, 2026",
|
|
1152
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogGetEntryOperator",
|
|
1153
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1154
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1155
|
+
category=AirflowProviderDeprecationWarning,
|
|
1156
|
+
)
|
|
1079
1157
|
class CloudDataCatalogGetEntryOperator(GoogleCloudBaseOperator):
|
|
1080
1158
|
"""
|
|
1081
1159
|
Gets an entry.
|
|
@@ -1159,7 +1237,6 @@ class CloudDataCatalogGetEntryOperator(GoogleCloudBaseOperator):
|
|
|
1159
1237
|
)
|
|
1160
1238
|
DataCatalogEntryLink.persist(
|
|
1161
1239
|
context=context,
|
|
1162
|
-
task_instance=self,
|
|
1163
1240
|
entry_id=self.entry,
|
|
1164
1241
|
entry_group_id=self.entry_group,
|
|
1165
1242
|
location_id=self.location,
|
|
@@ -1168,6 +1245,13 @@ class CloudDataCatalogGetEntryOperator(GoogleCloudBaseOperator):
|
|
|
1168
1245
|
return Entry.to_dict(result)
|
|
1169
1246
|
|
|
1170
1247
|
|
|
1248
|
+
@deprecated(
|
|
1249
|
+
planned_removal_date="January 30, 2026",
|
|
1250
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogGetEntryGroupOperator",
|
|
1251
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1252
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1253
|
+
category=AirflowProviderDeprecationWarning,
|
|
1254
|
+
)
|
|
1171
1255
|
class CloudDataCatalogGetEntryGroupOperator(GoogleCloudBaseOperator):
|
|
1172
1256
|
"""
|
|
1173
1257
|
Gets an entry group.
|
|
@@ -1254,7 +1338,6 @@ class CloudDataCatalogGetEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
1254
1338
|
)
|
|
1255
1339
|
DataCatalogEntryGroupLink.persist(
|
|
1256
1340
|
context=context,
|
|
1257
|
-
task_instance=self,
|
|
1258
1341
|
entry_group_id=self.entry_group,
|
|
1259
1342
|
location_id=self.location,
|
|
1260
1343
|
project_id=self.project_id or hook.project_id,
|
|
@@ -1262,6 +1345,13 @@ class CloudDataCatalogGetEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
1262
1345
|
return EntryGroup.to_dict(result)
|
|
1263
1346
|
|
|
1264
1347
|
|
|
1348
|
+
@deprecated(
|
|
1349
|
+
planned_removal_date="January 30, 2026",
|
|
1350
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogGetAspectTypeOperator",
|
|
1351
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1352
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1353
|
+
category=AirflowProviderDeprecationWarning,
|
|
1354
|
+
)
|
|
1265
1355
|
class CloudDataCatalogGetTagTemplateOperator(GoogleCloudBaseOperator):
|
|
1266
1356
|
"""
|
|
1267
1357
|
Gets a tag template.
|
|
@@ -1340,7 +1430,6 @@ class CloudDataCatalogGetTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
1340
1430
|
)
|
|
1341
1431
|
DataCatalogTagTemplateLink.persist(
|
|
1342
1432
|
context=context,
|
|
1343
|
-
task_instance=self,
|
|
1344
1433
|
tag_template_id=self.tag_template,
|
|
1345
1434
|
location_id=self.location,
|
|
1346
1435
|
project_id=self.project_id or hook.project_id,
|
|
@@ -1348,6 +1437,13 @@ class CloudDataCatalogGetTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
1348
1437
|
return TagTemplate.to_dict(result)
|
|
1349
1438
|
|
|
1350
1439
|
|
|
1440
|
+
@deprecated(
|
|
1441
|
+
planned_removal_date="January 30, 2026",
|
|
1442
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogGetEntryOperator",
|
|
1443
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1444
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1445
|
+
category=AirflowProviderDeprecationWarning,
|
|
1446
|
+
)
|
|
1351
1447
|
class CloudDataCatalogListTagsOperator(GoogleCloudBaseOperator):
|
|
1352
1448
|
"""
|
|
1353
1449
|
Lists the tags on an Entry.
|
|
@@ -1439,7 +1535,6 @@ class CloudDataCatalogListTagsOperator(GoogleCloudBaseOperator):
|
|
|
1439
1535
|
)
|
|
1440
1536
|
DataCatalogEntryLink.persist(
|
|
1441
1537
|
context=context,
|
|
1442
|
-
task_instance=self,
|
|
1443
1538
|
entry_id=self.entry,
|
|
1444
1539
|
entry_group_id=self.entry_group,
|
|
1445
1540
|
location_id=self.location,
|
|
@@ -1448,6 +1543,13 @@ class CloudDataCatalogListTagsOperator(GoogleCloudBaseOperator):
|
|
|
1448
1543
|
return [Tag.to_dict(item) for item in result]
|
|
1449
1544
|
|
|
1450
1545
|
|
|
1546
|
+
@deprecated(
|
|
1547
|
+
planned_removal_date="January 30, 2026",
|
|
1548
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogLookupEntryOperator",
|
|
1549
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1550
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1551
|
+
category=AirflowProviderDeprecationWarning,
|
|
1552
|
+
)
|
|
1451
1553
|
class CloudDataCatalogLookupEntryOperator(GoogleCloudBaseOperator):
|
|
1452
1554
|
r"""
|
|
1453
1555
|
Get an entry by target resource name.
|
|
@@ -1530,7 +1632,6 @@ class CloudDataCatalogLookupEntryOperator(GoogleCloudBaseOperator):
|
|
|
1530
1632
|
project_id, location_id, entry_group_id, entry_id = result.name.split("/")[1::2]
|
|
1531
1633
|
DataCatalogEntryLink.persist(
|
|
1532
1634
|
context=context,
|
|
1533
|
-
task_instance=self,
|
|
1534
1635
|
entry_id=entry_id,
|
|
1535
1636
|
entry_group_id=entry_group_id,
|
|
1536
1637
|
location_id=location_id,
|
|
@@ -1539,6 +1640,13 @@ class CloudDataCatalogLookupEntryOperator(GoogleCloudBaseOperator):
|
|
|
1539
1640
|
return Entry.to_dict(result)
|
|
1540
1641
|
|
|
1541
1642
|
|
|
1643
|
+
@deprecated(
|
|
1644
|
+
planned_removal_date="January 30, 2026",
|
|
1645
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateAspectTypeOperator",
|
|
1646
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1647
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1648
|
+
category=AirflowProviderDeprecationWarning,
|
|
1649
|
+
)
|
|
1542
1650
|
class CloudDataCatalogRenameTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
1543
1651
|
"""
|
|
1544
1652
|
Renames a field in a tag template.
|
|
@@ -1629,13 +1737,19 @@ class CloudDataCatalogRenameTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
1629
1737
|
)
|
|
1630
1738
|
DataCatalogTagTemplateLink.persist(
|
|
1631
1739
|
context=context,
|
|
1632
|
-
task_instance=self,
|
|
1633
1740
|
tag_template_id=self.tag_template,
|
|
1634
1741
|
location_id=self.location,
|
|
1635
1742
|
project_id=self.project_id or hook.project_id,
|
|
1636
1743
|
)
|
|
1637
1744
|
|
|
1638
1745
|
|
|
1746
|
+
@deprecated(
|
|
1747
|
+
planned_removal_date="January 30, 2026",
|
|
1748
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogSearchEntriesOperator",
|
|
1749
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1750
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1751
|
+
category=AirflowProviderDeprecationWarning,
|
|
1752
|
+
)
|
|
1639
1753
|
class CloudDataCatalogSearchCatalogOperator(GoogleCloudBaseOperator):
|
|
1640
1754
|
r"""
|
|
1641
1755
|
Searches Data Catalog for multiple resources like entries, tags that match a query.
|
|
@@ -1746,6 +1860,13 @@ class CloudDataCatalogSearchCatalogOperator(GoogleCloudBaseOperator):
|
|
|
1746
1860
|
return [SearchCatalogResult.to_dict(item) for item in result]
|
|
1747
1861
|
|
|
1748
1862
|
|
|
1863
|
+
@deprecated(
|
|
1864
|
+
planned_removal_date="January 30, 2026",
|
|
1865
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateEntryOperator",
|
|
1866
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1867
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1868
|
+
category=AirflowProviderDeprecationWarning,
|
|
1869
|
+
)
|
|
1749
1870
|
class CloudDataCatalogUpdateEntryOperator(GoogleCloudBaseOperator):
|
|
1750
1871
|
"""
|
|
1751
1872
|
Updates an existing entry.
|
|
@@ -1848,7 +1969,6 @@ class CloudDataCatalogUpdateEntryOperator(GoogleCloudBaseOperator):
|
|
|
1848
1969
|
location_id, entry_group_id, entry_id = result.name.split("/")[3::2]
|
|
1849
1970
|
DataCatalogEntryLink.persist(
|
|
1850
1971
|
context=context,
|
|
1851
|
-
task_instance=self,
|
|
1852
1972
|
entry_id=self.entry_id or entry_id,
|
|
1853
1973
|
entry_group_id=self.entry_group or entry_group_id,
|
|
1854
1974
|
location_id=self.location or location_id,
|
|
@@ -1856,6 +1976,13 @@ class CloudDataCatalogUpdateEntryOperator(GoogleCloudBaseOperator):
|
|
|
1856
1976
|
)
|
|
1857
1977
|
|
|
1858
1978
|
|
|
1979
|
+
@deprecated(
|
|
1980
|
+
planned_removal_date="January 30, 2026",
|
|
1981
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateEntryOperator",
|
|
1982
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
1983
|
+
"in favor of Dataplex Universal Catalog.",
|
|
1984
|
+
category=AirflowProviderDeprecationWarning,
|
|
1985
|
+
)
|
|
1859
1986
|
class CloudDataCatalogUpdateTagOperator(GoogleCloudBaseOperator):
|
|
1860
1987
|
"""
|
|
1861
1988
|
Updates an existing tag.
|
|
@@ -1962,7 +2089,6 @@ class CloudDataCatalogUpdateTagOperator(GoogleCloudBaseOperator):
|
|
|
1962
2089
|
location_id, entry_group_id, entry_id = result.name.split("/")[3:8:2]
|
|
1963
2090
|
DataCatalogEntryLink.persist(
|
|
1964
2091
|
context=context,
|
|
1965
|
-
task_instance=self,
|
|
1966
2092
|
entry_id=self.entry or entry_id,
|
|
1967
2093
|
entry_group_id=self.entry_group or entry_group_id,
|
|
1968
2094
|
location_id=self.location or location_id,
|
|
@@ -1970,6 +2096,13 @@ class CloudDataCatalogUpdateTagOperator(GoogleCloudBaseOperator):
|
|
|
1970
2096
|
)
|
|
1971
2097
|
|
|
1972
2098
|
|
|
2099
|
+
@deprecated(
|
|
2100
|
+
planned_removal_date="January 30, 2026",
|
|
2101
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateAspectTypeOperator",
|
|
2102
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
2103
|
+
"in favor of Dataplex Universal Catalog.",
|
|
2104
|
+
category=AirflowProviderDeprecationWarning,
|
|
2105
|
+
)
|
|
1973
2106
|
class CloudDataCatalogUpdateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
1974
2107
|
"""
|
|
1975
2108
|
Updates a tag template.
|
|
@@ -2072,13 +2205,19 @@ class CloudDataCatalogUpdateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
2072
2205
|
location_id, tag_template_id = result.name.split("/")[3::2]
|
|
2073
2206
|
DataCatalogTagTemplateLink.persist(
|
|
2074
2207
|
context=context,
|
|
2075
|
-
task_instance=self,
|
|
2076
2208
|
tag_template_id=self.tag_template_id or tag_template_id,
|
|
2077
2209
|
location_id=self.location or location_id,
|
|
2078
2210
|
project_id=self.project_id or hook.project_id,
|
|
2079
2211
|
)
|
|
2080
2212
|
|
|
2081
2213
|
|
|
2214
|
+
@deprecated(
|
|
2215
|
+
planned_removal_date="January 30, 2026",
|
|
2216
|
+
use_instead="airflow.providers.google.cloud.operators.dataplex.DataplexCatalogUpdateAspectTypeOperator",
|
|
2217
|
+
reason="The Data Catalog will be discontinued on January 30, 2026 "
|
|
2218
|
+
"in favor of Dataplex Universal Catalog.",
|
|
2219
|
+
category=AirflowProviderDeprecationWarning,
|
|
2220
|
+
)
|
|
2082
2221
|
class CloudDataCatalogUpdateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
2083
2222
|
"""
|
|
2084
2223
|
Updates a field in a tag template. This method cannot be used to update the field type.
|
|
@@ -2193,7 +2332,6 @@ class CloudDataCatalogUpdateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
2193
2332
|
location_id, tag_template_id = result.name.split("/")[3:6:2]
|
|
2194
2333
|
DataCatalogTagTemplateLink.persist(
|
|
2195
2334
|
context=context,
|
|
2196
|
-
task_instance=self,
|
|
2197
2335
|
tag_template_id=self.tag_template or tag_template_id,
|
|
2198
2336
|
location_id=self.location or location_id,
|
|
2199
2337
|
project_id=self.project_id or hook.project_id,
|
|
@@ -43,7 +43,7 @@ from airflow.providers.google.common.consts import GOOGLE_DEFAULT_DEFERRABLE_MET
|
|
|
43
43
|
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
|
|
44
44
|
|
|
45
45
|
if TYPE_CHECKING:
|
|
46
|
-
from airflow.
|
|
46
|
+
from airflow.providers.common.compat.sdk import Context
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class CheckJobRunning(Enum):
|
|
@@ -383,7 +383,12 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
|
|
|
383
383
|
def execute(self, context: Context):
|
|
384
384
|
def set_current_job(current_job):
|
|
385
385
|
self.job = current_job
|
|
386
|
-
DataflowJobLink.persist(
|
|
386
|
+
DataflowJobLink.persist(
|
|
387
|
+
context=context,
|
|
388
|
+
project_id=self.project_id,
|
|
389
|
+
region=self.location,
|
|
390
|
+
job_id=self.job.get("id"),
|
|
391
|
+
)
|
|
387
392
|
|
|
388
393
|
options = self.dataflow_default_options
|
|
389
394
|
options.update(self.options)
|
|
@@ -404,7 +409,7 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
|
|
|
404
409
|
append_job_name=self.append_job_name,
|
|
405
410
|
)
|
|
406
411
|
job_id = self.hook.extract_job_id(self.job)
|
|
407
|
-
|
|
412
|
+
context["task_instance"].xcom_push(key="job_id", value=job_id)
|
|
408
413
|
return job_id
|
|
409
414
|
|
|
410
415
|
self.job = self.hook.launch_job_with_template(
|
|
@@ -418,7 +423,9 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
|
|
|
418
423
|
environment=self.environment,
|
|
419
424
|
)
|
|
420
425
|
job_id = self.hook.extract_job_id(self.job)
|
|
421
|
-
DataflowJobLink.persist(
|
|
426
|
+
DataflowJobLink.persist(
|
|
427
|
+
context=context, project_id=self.project_id, region=self.location, job_id=job_id
|
|
428
|
+
)
|
|
422
429
|
self.defer(
|
|
423
430
|
trigger=TemplateJobStartTrigger(
|
|
424
431
|
project_id=self.project_id,
|
|
@@ -439,7 +446,7 @@ class DataflowTemplatedJobStartOperator(GoogleCloudBaseOperator):
|
|
|
439
446
|
raise AirflowException(event["message"])
|
|
440
447
|
|
|
441
448
|
job_id = event["job_id"]
|
|
442
|
-
|
|
449
|
+
context["task_instance"].xcom_push(key="job_id", value=job_id)
|
|
443
450
|
self.log.info("Task %s completed with response %s", self.task_id, event["message"])
|
|
444
451
|
return job_id
|
|
445
452
|
|
|
@@ -590,7 +597,9 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
|
|
|
590
597
|
|
|
591
598
|
def set_current_job(current_job):
|
|
592
599
|
self.job = current_job
|
|
593
|
-
DataflowJobLink.persist(
|
|
600
|
+
DataflowJobLink.persist(
|
|
601
|
+
context=context, project_id=self.project_id, region=self.location, job_id=self.job.get("id")
|
|
602
|
+
)
|
|
594
603
|
|
|
595
604
|
if not self.deferrable:
|
|
596
605
|
self.job = self.hook.start_flex_template(
|
|
@@ -600,7 +609,7 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
|
|
|
600
609
|
on_new_job_callback=set_current_job,
|
|
601
610
|
)
|
|
602
611
|
job_id = self.hook.extract_job_id(self.job)
|
|
603
|
-
|
|
612
|
+
context["task_instance"].xcom_push(key="job_id", value=job_id)
|
|
604
613
|
return self.job
|
|
605
614
|
|
|
606
615
|
self.job = self.hook.launch_job_with_flex_template(
|
|
@@ -609,7 +618,9 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
|
|
|
609
618
|
project_id=self.project_id,
|
|
610
619
|
)
|
|
611
620
|
job_id = self.hook.extract_job_id(self.job)
|
|
612
|
-
DataflowJobLink.persist(
|
|
621
|
+
DataflowJobLink.persist(
|
|
622
|
+
context=context, project_id=self.project_id, region=self.location, job_id=job_id
|
|
623
|
+
)
|
|
613
624
|
self.defer(
|
|
614
625
|
trigger=TemplateJobStartTrigger(
|
|
615
626
|
project_id=self.project_id,
|
|
@@ -639,7 +650,7 @@ class DataflowStartFlexTemplateOperator(GoogleCloudBaseOperator):
|
|
|
639
650
|
|
|
640
651
|
job_id = event["job_id"]
|
|
641
652
|
self.log.info("Task %s completed with response %s", job_id, event["message"])
|
|
642
|
-
|
|
653
|
+
context["task_instance"].xcom_push(key="job_id", value=job_id)
|
|
643
654
|
job = self.hook.get_job(job_id=job_id, project_id=self.project_id, location=self.location)
|
|
644
655
|
return job
|
|
645
656
|
|
|
@@ -764,7 +775,9 @@ class DataflowStartYamlJobOperator(GoogleCloudBaseOperator):
|
|
|
764
775
|
location=self.region,
|
|
765
776
|
)
|
|
766
777
|
|
|
767
|
-
DataflowJobLink.persist(
|
|
778
|
+
DataflowJobLink.persist(
|
|
779
|
+
context=context, project_id=self.project_id, region=self.region, job_id=self.job_id
|
|
780
|
+
)
|
|
768
781
|
|
|
769
782
|
if self.deferrable:
|
|
770
783
|
self.defer(
|
|
@@ -794,7 +807,7 @@ class DataflowStartYamlJobOperator(GoogleCloudBaseOperator):
|
|
|
794
807
|
raise AirflowException(event["message"])
|
|
795
808
|
job = event["job"]
|
|
796
809
|
self.log.info("Job %s completed with response %s", job["id"], event["message"])
|
|
797
|
-
|
|
810
|
+
context["task_instance"].xcom_push(key="job_id", value=job["id"])
|
|
798
811
|
|
|
799
812
|
return job
|
|
800
813
|
|
|
@@ -971,6 +984,14 @@ class DataflowCreatePipelineOperator(GoogleCloudBaseOperator):
|
|
|
971
984
|
|
|
972
985
|
self.pipeline_name = self.body["name"].split("/")[-1] if self.body else None
|
|
973
986
|
|
|
987
|
+
@property
|
|
988
|
+
def extra_links_params(self) -> dict[str, Any]:
|
|
989
|
+
return {
|
|
990
|
+
"project_id": self.project_id,
|
|
991
|
+
"location": self.location,
|
|
992
|
+
"pipeline_name": self.pipeline_name,
|
|
993
|
+
}
|
|
994
|
+
|
|
974
995
|
def execute(self, context: Context):
|
|
975
996
|
if self.body is None:
|
|
976
997
|
raise AirflowException(
|
|
@@ -1003,8 +1024,8 @@ class DataflowCreatePipelineOperator(GoogleCloudBaseOperator):
|
|
|
1003
1024
|
pipeline_name=self.pipeline_name,
|
|
1004
1025
|
location=self.location,
|
|
1005
1026
|
)
|
|
1006
|
-
DataflowPipelineLink.persist(
|
|
1007
|
-
|
|
1027
|
+
DataflowPipelineLink.persist(context=context)
|
|
1028
|
+
context["task_instance"].xcom_push(key="pipeline_name", value=self.pipeline_name)
|
|
1008
1029
|
if self.pipeline:
|
|
1009
1030
|
if "error" in self.pipeline:
|
|
1010
1031
|
raise AirflowException(self.pipeline.get("error").get("message"))
|
|
@@ -1075,8 +1096,10 @@ class DataflowRunPipelineOperator(GoogleCloudBaseOperator):
|
|
|
1075
1096
|
location=self.location,
|
|
1076
1097
|
)["job"]
|
|
1077
1098
|
job_id = self.dataflow_hook.extract_job_id(self.job)
|
|
1078
|
-
|
|
1079
|
-
DataflowJobLink.persist(
|
|
1099
|
+
context["task_instance"].xcom_push(key="job_id", value=job_id)
|
|
1100
|
+
DataflowJobLink.persist(
|
|
1101
|
+
context=context, project_id=self.project_id, region=self.location, job_id=job_id
|
|
1102
|
+
)
|
|
1080
1103
|
except HttpError as e:
|
|
1081
1104
|
if e.resp.status == 404:
|
|
1082
1105
|
raise AirflowException("Pipeline with given name was not found.")
|
|
@@ -26,11 +26,10 @@ from airflow.providers.google.cloud.links.dataform import (
|
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
if TYPE_CHECKING:
|
|
29
|
-
from airflow.utils.context import Context
|
|
30
29
|
from google.api_core.retry import Retry
|
|
31
30
|
|
|
32
|
-
from airflow.providers.
|
|
33
|
-
|
|
31
|
+
from airflow.providers.common.compat.sdk import Context
|
|
32
|
+
|
|
34
33
|
from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
|
|
35
34
|
from google.cloud.dataform_v1beta1.types import (
|
|
36
35
|
CompilationResult,
|
|
@@ -43,6 +42,9 @@ from google.cloud.dataform_v1beta1.types import (
|
|
|
43
42
|
WriteFileResponse,
|
|
44
43
|
)
|
|
45
44
|
|
|
45
|
+
from airflow.providers.google.cloud.hooks.dataform import DataformHook
|
|
46
|
+
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
|
|
47
|
+
|
|
46
48
|
|
|
47
49
|
class DataformCreateCompilationResultOperator(GoogleCloudBaseOperator):
|
|
48
50
|
"""
|
|
@@ -256,7 +258,6 @@ class DataformCreateWorkflowInvocationOperator(GoogleCloudBaseOperator):
|
|
|
256
258
|
)
|
|
257
259
|
workflow_invocation_id = result.name.split("/")[-1]
|
|
258
260
|
DataformWorkflowInvocationLink.persist(
|
|
259
|
-
operator_instance=self,
|
|
260
261
|
context=context,
|
|
261
262
|
project_id=self.project_id,
|
|
262
263
|
region=self.region,
|
|
@@ -345,6 +346,13 @@ class DataformGetWorkflowInvocationOperator(GoogleCloudBaseOperator):
|
|
|
345
346
|
timeout=self.timeout,
|
|
346
347
|
metadata=self.metadata,
|
|
347
348
|
)
|
|
349
|
+
DataformWorkflowInvocationLink.persist(
|
|
350
|
+
context=context,
|
|
351
|
+
project_id=self.project_id,
|
|
352
|
+
region=self.region,
|
|
353
|
+
repository_id=self.repository_id,
|
|
354
|
+
workflow_invocation_id=self.workflow_invocation_id,
|
|
355
|
+
)
|
|
348
356
|
return WorkflowInvocation.to_dict(result)
|
|
349
357
|
|
|
350
358
|
|
|
@@ -410,7 +418,6 @@ class DataformQueryWorkflowInvocationActionsOperator(GoogleCloudBaseOperator):
|
|
|
410
418
|
impersonation_chain=self.impersonation_chain,
|
|
411
419
|
)
|
|
412
420
|
DataformWorkflowInvocationLink.persist(
|
|
413
|
-
operator_instance=self,
|
|
414
421
|
context=context,
|
|
415
422
|
project_id=self.project_id,
|
|
416
423
|
region=self.region,
|
|
@@ -492,6 +499,13 @@ class DataformCancelWorkflowInvocationOperator(GoogleCloudBaseOperator):
|
|
|
492
499
|
gcp_conn_id=self.gcp_conn_id,
|
|
493
500
|
impersonation_chain=self.impersonation_chain,
|
|
494
501
|
)
|
|
502
|
+
DataformWorkflowInvocationLink.persist(
|
|
503
|
+
context=context,
|
|
504
|
+
project_id=self.project_id,
|
|
505
|
+
region=self.region,
|
|
506
|
+
repository_id=self.repository_id,
|
|
507
|
+
workflow_invocation_id=self.workflow_invocation_id,
|
|
508
|
+
)
|
|
495
509
|
hook.cancel_workflow_invocation(
|
|
496
510
|
project_id=self.project_id,
|
|
497
511
|
region=self.region,
|
|
@@ -574,7 +588,6 @@ class DataformCreateRepositoryOperator(GoogleCloudBaseOperator):
|
|
|
574
588
|
)
|
|
575
589
|
|
|
576
590
|
DataformRepositoryLink.persist(
|
|
577
|
-
operator_instance=self,
|
|
578
591
|
context=context,
|
|
579
592
|
project_id=self.project_id,
|
|
580
593
|
region=self.region,
|
|
@@ -733,7 +746,6 @@ class DataformCreateWorkspaceOperator(GoogleCloudBaseOperator):
|
|
|
733
746
|
)
|
|
734
747
|
|
|
735
748
|
DataformWorkspaceLink.persist(
|
|
736
|
-
operator_instance=self,
|
|
737
749
|
context=context,
|
|
738
750
|
project_id=self.project_id,
|
|
739
751
|
region=self.region,
|