apache-airflow-providers-google 15.1.0rc1__py3-none-any.whl → 19.3.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/3rd-party-licenses/NOTICE +2 -12
- airflow/providers/google/__init__.py +3 -3
- airflow/providers/google/ads/hooks/ads.py +39 -6
- airflow/providers/google/ads/operators/ads.py +2 -2
- airflow/providers/google/ads/transfers/ads_to_gcs.py +2 -2
- airflow/providers/google/assets/gcs.py +1 -11
- airflow/providers/google/cloud/bundles/__init__.py +16 -0
- airflow/providers/google/cloud/bundles/gcs.py +161 -0
- airflow/providers/google/cloud/hooks/alloy_db.py +1 -1
- airflow/providers/google/cloud/hooks/bigquery.py +176 -293
- airflow/providers/google/cloud/hooks/cloud_batch.py +1 -1
- airflow/providers/google/cloud/hooks/cloud_build.py +1 -1
- airflow/providers/google/cloud/hooks/cloud_composer.py +288 -15
- airflow/providers/google/cloud/hooks/cloud_logging.py +109 -0
- airflow/providers/google/cloud/hooks/cloud_memorystore.py +1 -1
- airflow/providers/google/cloud/hooks/cloud_run.py +18 -10
- airflow/providers/google/cloud/hooks/cloud_sql.py +102 -23
- airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py +29 -7
- airflow/providers/google/cloud/hooks/compute.py +1 -1
- airflow/providers/google/cloud/hooks/compute_ssh.py +6 -2
- airflow/providers/google/cloud/hooks/datacatalog.py +10 -1
- airflow/providers/google/cloud/hooks/dataflow.py +72 -95
- airflow/providers/google/cloud/hooks/dataform.py +1 -1
- airflow/providers/google/cloud/hooks/datafusion.py +21 -19
- airflow/providers/google/cloud/hooks/dataplex.py +2 -2
- airflow/providers/google/cloud/hooks/dataprep.py +1 -1
- airflow/providers/google/cloud/hooks/dataproc.py +73 -72
- airflow/providers/google/cloud/hooks/dataproc_metastore.py +1 -1
- airflow/providers/google/cloud/hooks/dlp.py +1 -1
- airflow/providers/google/cloud/hooks/functions.py +1 -1
- airflow/providers/google/cloud/hooks/gcs.py +112 -15
- airflow/providers/google/cloud/hooks/gdm.py +1 -1
- airflow/providers/google/cloud/hooks/gen_ai.py +196 -0
- airflow/providers/google/cloud/hooks/kubernetes_engine.py +3 -3
- airflow/providers/google/cloud/hooks/looker.py +6 -2
- airflow/providers/google/cloud/hooks/managed_kafka.py +1 -1
- airflow/providers/google/cloud/hooks/mlengine.py +4 -3
- airflow/providers/google/cloud/hooks/pubsub.py +3 -0
- airflow/providers/google/cloud/hooks/secret_manager.py +102 -10
- airflow/providers/google/cloud/hooks/spanner.py +74 -9
- airflow/providers/google/cloud/hooks/stackdriver.py +11 -9
- airflow/providers/google/cloud/hooks/tasks.py +1 -1
- airflow/providers/google/cloud/hooks/translate.py +2 -2
- airflow/providers/google/cloud/hooks/vertex_ai/auto_ml.py +2 -210
- airflow/providers/google/cloud/hooks/vertex_ai/batch_prediction_job.py +3 -3
- airflow/providers/google/cloud/hooks/vertex_ai/custom_job.py +28 -2
- airflow/providers/google/cloud/hooks/vertex_ai/experiment_service.py +202 -0
- airflow/providers/google/cloud/hooks/vertex_ai/feature_store.py +308 -8
- airflow/providers/google/cloud/hooks/vertex_ai/generative_model.py +79 -75
- airflow/providers/google/cloud/hooks/vertex_ai/hyperparameter_tuning_job.py +1 -1
- airflow/providers/google/cloud/hooks/vertex_ai/model_service.py +1 -1
- airflow/providers/google/cloud/hooks/vertex_ai/pipeline_job.py +1 -1
- airflow/providers/google/cloud/hooks/vertex_ai/ray.py +223 -0
- airflow/providers/google/cloud/hooks/vision.py +3 -3
- airflow/providers/google/cloud/hooks/workflows.py +1 -1
- airflow/providers/google/cloud/links/alloy_db.py +0 -46
- airflow/providers/google/cloud/links/base.py +77 -13
- 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 -44
- 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 -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 +11 -95
- airflow/providers/google/cloud/links/datastore.py +0 -31
- airflow/providers/google/cloud/links/kubernetes_engine.py +9 -60
- 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 +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 +58 -22
- airflow/providers/google/cloud/log/stackdriver_task_handler.py +9 -6
- 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 +102 -1
- airflow/providers/google/cloud/openlineage/mixins.py +10 -8
- airflow/providers/google/cloud/openlineage/utils.py +15 -1
- airflow/providers/google/cloud/operators/alloy_db.py +71 -56
- airflow/providers/google/cloud/operators/bigquery.py +73 -636
- airflow/providers/google/cloud/operators/bigquery_dts.py +4 -6
- airflow/providers/google/cloud/operators/bigtable.py +37 -8
- airflow/providers/google/cloud/operators/cloud_base.py +21 -1
- airflow/providers/google/cloud/operators/cloud_batch.py +3 -3
- airflow/providers/google/cloud/operators/cloud_build.py +76 -33
- airflow/providers/google/cloud/operators/cloud_composer.py +129 -41
- airflow/providers/google/cloud/operators/cloud_logging_sink.py +341 -0
- airflow/providers/google/cloud/operators/cloud_memorystore.py +69 -43
- airflow/providers/google/cloud/operators/cloud_run.py +24 -6
- airflow/providers/google/cloud/operators/cloud_sql.py +8 -17
- airflow/providers/google/cloud/operators/cloud_storage_transfer_service.py +93 -12
- airflow/providers/google/cloud/operators/compute.py +9 -41
- airflow/providers/google/cloud/operators/datacatalog.py +157 -21
- airflow/providers/google/cloud/operators/dataflow.py +40 -16
- airflow/providers/google/cloud/operators/dataform.py +15 -5
- airflow/providers/google/cloud/operators/datafusion.py +42 -21
- airflow/providers/google/cloud/operators/dataplex.py +194 -110
- airflow/providers/google/cloud/operators/dataprep.py +1 -5
- airflow/providers/google/cloud/operators/dataproc.py +80 -36
- airflow/providers/google/cloud/operators/dataproc_metastore.py +97 -89
- airflow/providers/google/cloud/operators/datastore.py +23 -7
- airflow/providers/google/cloud/operators/dlp.py +6 -29
- airflow/providers/google/cloud/operators/functions.py +17 -8
- airflow/providers/google/cloud/operators/gcs.py +12 -9
- airflow/providers/google/cloud/operators/gen_ai.py +389 -0
- airflow/providers/google/cloud/operators/kubernetes_engine.py +62 -100
- airflow/providers/google/cloud/operators/looker.py +2 -2
- airflow/providers/google/cloud/operators/managed_kafka.py +108 -53
- airflow/providers/google/cloud/operators/natural_language.py +1 -1
- airflow/providers/google/cloud/operators/pubsub.py +68 -15
- airflow/providers/google/cloud/operators/spanner.py +26 -13
- airflow/providers/google/cloud/operators/speech_to_text.py +2 -3
- airflow/providers/google/cloud/operators/stackdriver.py +1 -9
- airflow/providers/google/cloud/operators/tasks.py +1 -12
- airflow/providers/google/cloud/operators/text_to_speech.py +2 -3
- airflow/providers/google/cloud/operators/translate.py +41 -17
- airflow/providers/google/cloud/operators/translate_speech.py +2 -3
- airflow/providers/google/cloud/operators/vertex_ai/auto_ml.py +39 -19
- airflow/providers/google/cloud/operators/vertex_ai/batch_prediction_job.py +30 -10
- airflow/providers/google/cloud/operators/vertex_ai/custom_job.py +55 -27
- airflow/providers/google/cloud/operators/vertex_ai/dataset.py +70 -8
- airflow/providers/google/cloud/operators/vertex_ai/endpoint_service.py +43 -9
- 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 -115
- airflow/providers/google/cloud/operators/vertex_ai/hyperparameter_tuning_job.py +12 -10
- airflow/providers/google/cloud/operators/vertex_ai/model_service.py +57 -11
- airflow/providers/google/cloud/operators/vertex_ai/pipeline_job.py +31 -8
- airflow/providers/google/cloud/operators/vertex_ai/ray.py +393 -0
- airflow/providers/google/cloud/operators/video_intelligence.py +1 -1
- airflow/providers/google/cloud/operators/vision.py +2 -2
- airflow/providers/google/cloud/operators/workflows.py +18 -15
- airflow/providers/google/cloud/secrets/secret_manager.py +3 -2
- airflow/providers/google/cloud/sensors/bigquery.py +3 -3
- airflow/providers/google/cloud/sensors/bigquery_dts.py +2 -3
- airflow/providers/google/cloud/sensors/bigtable.py +11 -4
- airflow/providers/google/cloud/sensors/cloud_composer.py +533 -30
- airflow/providers/google/cloud/sensors/cloud_storage_transfer_service.py +2 -3
- airflow/providers/google/cloud/sensors/dataflow.py +26 -10
- airflow/providers/google/cloud/sensors/dataform.py +2 -3
- airflow/providers/google/cloud/sensors/datafusion.py +4 -5
- airflow/providers/google/cloud/sensors/dataplex.py +2 -3
- airflow/providers/google/cloud/sensors/dataprep.py +2 -2
- airflow/providers/google/cloud/sensors/dataproc.py +2 -3
- airflow/providers/google/cloud/sensors/dataproc_metastore.py +2 -3
- airflow/providers/google/cloud/sensors/gcs.py +4 -5
- airflow/providers/google/cloud/sensors/looker.py +2 -3
- airflow/providers/google/cloud/sensors/pubsub.py +4 -5
- airflow/providers/google/cloud/sensors/tasks.py +2 -2
- airflow/providers/google/cloud/sensors/vertex_ai/feature_store.py +2 -3
- airflow/providers/google/cloud/sensors/workflows.py +2 -3
- 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 +4 -3
- airflow/providers/google/cloud/transfers/bigquery_to_bigquery.py +11 -8
- airflow/providers/google/cloud/transfers/bigquery_to_gcs.py +10 -5
- 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 +3 -3
- airflow/providers/google/cloud/transfers/facebook_ads_to_gcs.py +4 -4
- airflow/providers/google/cloud/transfers/gcs_to_bigquery.py +21 -13
- airflow/providers/google/cloud/transfers/gcs_to_gcs.py +4 -3
- airflow/providers/google/cloud/transfers/gcs_to_local.py +6 -4
- airflow/providers/google/cloud/transfers/gcs_to_sftp.py +11 -5
- 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 +42 -9
- airflow/providers/google/cloud/transfers/s3_to_gcs.py +13 -7
- airflow/providers/google/cloud/transfers/salesforce_to_gcs.py +2 -2
- airflow/providers/google/cloud/transfers/sftp_to_gcs.py +14 -5
- 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 +76 -35
- airflow/providers/google/cloud/triggers/cloud_build.py +1 -1
- airflow/providers/google/cloud/triggers/cloud_composer.py +303 -47
- airflow/providers/google/cloud/triggers/cloud_run.py +3 -3
- airflow/providers/google/cloud/triggers/cloud_storage_transfer_service.py +92 -2
- airflow/providers/google/cloud/triggers/dataflow.py +122 -0
- airflow/providers/google/cloud/triggers/datafusion.py +1 -1
- airflow/providers/google/cloud/triggers/dataplex.py +14 -2
- airflow/providers/google/cloud/triggers/dataproc.py +123 -53
- airflow/providers/google/cloud/triggers/kubernetes_engine.py +47 -28
- airflow/providers/google/cloud/triggers/mlengine.py +1 -1
- airflow/providers/google/cloud/triggers/pubsub.py +15 -19
- airflow/providers/google/cloud/triggers/vertex_ai.py +1 -1
- airflow/providers/google/cloud/utils/bigquery_get_data.py +1 -1
- airflow/providers/google/cloud/utils/credentials_provider.py +2 -2
- airflow/providers/google/cloud/utils/field_sanitizer.py +1 -1
- airflow/providers/google/cloud/utils/field_validator.py +2 -3
- airflow/providers/google/common/auth_backend/google_openid.py +4 -4
- airflow/providers/google/common/deprecated.py +2 -1
- airflow/providers/google/common/hooks/base_google.py +27 -9
- airflow/providers/google/common/hooks/operation_helpers.py +1 -1
- 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 +3 -4
- airflow/providers/google/firebase/hooks/firestore.py +1 -1
- airflow/providers/google/firebase/operators/firestore.py +3 -3
- airflow/providers/google/get_provider_info.py +56 -52
- airflow/providers/google/go_module_utils.py +35 -3
- airflow/providers/google/leveldb/hooks/leveldb.py +27 -2
- airflow/providers/google/leveldb/operators/leveldb.py +2 -2
- airflow/providers/google/marketing_platform/hooks/campaign_manager.py +1 -1
- 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 +5 -14
- airflow/providers/google/marketing_platform/operators/analytics_admin.py +2 -3
- airflow/providers/google/marketing_platform/operators/campaign_manager.py +6 -6
- 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 +3 -64
- airflow/providers/google/suite/hooks/calendar.py +2 -2
- airflow/providers/google/suite/hooks/sheets.py +16 -2
- 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 +3 -3
- 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-15.1.0rc1.dist-info → apache_airflow_providers_google-19.3.0.dist-info}/METADATA +90 -46
- apache_airflow_providers_google-19.3.0.dist-info/RECORD +331 -0
- apache_airflow_providers_google-19.3.0.dist-info/licenses/NOTICE +5 -0
- airflow/providers/google/cloud/hooks/automl.py +0 -673
- 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 -1362
- airflow/providers/google/cloud/operators/life_sciences.py +0 -119
- airflow/providers/google/cloud/operators/mlengine.py +0 -112
- apache_airflow_providers_google-15.1.0rc1.dist-info/RECORD +0 -321
- {apache_airflow_providers_google-15.1.0rc1.dist-info → apache_airflow_providers_google-19.3.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_google-15.1.0rc1.dist-info → apache_airflow_providers_google-19.3.0.dist-info}/entry_points.txt +0 -0
- {airflow/providers/google → apache_airflow_providers_google-19.3.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -26,7 +26,7 @@ from typing import TYPE_CHECKING, Any
|
|
|
26
26
|
from google.api_core import exceptions
|
|
27
27
|
from google.cloud.compute_v1.types import Instance, InstanceGroupManager, InstanceTemplate
|
|
28
28
|
|
|
29
|
-
from airflow.
|
|
29
|
+
from airflow.providers.common.compat.sdk import AirflowException
|
|
30
30
|
from airflow.providers.google._vendor.json_merge_patch import merge
|
|
31
31
|
from airflow.providers.google.cloud.hooks.compute import ComputeEngineHook
|
|
32
32
|
from airflow.providers.google.cloud.links.compute import (
|
|
@@ -42,7 +42,7 @@ from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
|
|
|
42
42
|
if TYPE_CHECKING:
|
|
43
43
|
from google.api_core.retry import Retry
|
|
44
44
|
|
|
45
|
-
from airflow.
|
|
45
|
+
from airflow.providers.common.compat.sdk import Context
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
class ComputeEngineBaseOperator(GoogleCloudBaseOperator):
|
|
@@ -74,6 +74,13 @@ class ComputeEngineBaseOperator(GoogleCloudBaseOperator):
|
|
|
74
74
|
if not self.zone:
|
|
75
75
|
raise AirflowException("The required parameter 'zone' is missing")
|
|
76
76
|
|
|
77
|
+
@property
|
|
78
|
+
def extra_links_params(self) -> dict[str, Any]:
|
|
79
|
+
return {
|
|
80
|
+
"location_id": self.zone,
|
|
81
|
+
"resource_id": self.resource_id,
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
def execute(self, context: Context):
|
|
78
85
|
pass
|
|
79
86
|
|
|
@@ -225,9 +232,6 @@ class ComputeEngineInsertInstanceOperator(ComputeEngineBaseOperator):
|
|
|
225
232
|
self.log.info("The %s Instance already exists", self.resource_id)
|
|
226
233
|
ComputeInstanceDetailsLink.persist(
|
|
227
234
|
context=context,
|
|
228
|
-
task_instance=self,
|
|
229
|
-
location_id=self.zone,
|
|
230
|
-
resource_id=self.resource_id,
|
|
231
235
|
project_id=self.project_id or hook.project_id,
|
|
232
236
|
)
|
|
233
237
|
return Instance.to_dict(existing_instance)
|
|
@@ -247,9 +251,6 @@ class ComputeEngineInsertInstanceOperator(ComputeEngineBaseOperator):
|
|
|
247
251
|
)
|
|
248
252
|
ComputeInstanceDetailsLink.persist(
|
|
249
253
|
context=context,
|
|
250
|
-
task_instance=self,
|
|
251
|
-
location_id=self.zone,
|
|
252
|
-
resource_id=self.resource_id,
|
|
253
254
|
project_id=self.project_id or hook.project_id,
|
|
254
255
|
)
|
|
255
256
|
return Instance.to_dict(new_instance)
|
|
@@ -397,9 +398,6 @@ class ComputeEngineInsertInstanceFromTemplateOperator(ComputeEngineBaseOperator)
|
|
|
397
398
|
self.log.info("The %s Instance already exists", self.resource_id)
|
|
398
399
|
ComputeInstanceDetailsLink.persist(
|
|
399
400
|
context=context,
|
|
400
|
-
task_instance=self,
|
|
401
|
-
location_id=self.zone,
|
|
402
|
-
resource_id=self.resource_id,
|
|
403
401
|
project_id=self.project_id or hook.project_id,
|
|
404
402
|
)
|
|
405
403
|
return Instance.to_dict(existing_instance)
|
|
@@ -420,9 +418,6 @@ class ComputeEngineInsertInstanceFromTemplateOperator(ComputeEngineBaseOperator)
|
|
|
420
418
|
)
|
|
421
419
|
ComputeInstanceDetailsLink.persist(
|
|
422
420
|
context=context,
|
|
423
|
-
task_instance=self,
|
|
424
|
-
location_id=self.zone,
|
|
425
|
-
resource_id=self.resource_id,
|
|
426
421
|
project_id=self.project_id or hook.project_id,
|
|
427
422
|
)
|
|
428
423
|
return Instance.to_dict(new_instance_from_template)
|
|
@@ -598,9 +593,6 @@ class ComputeEngineStartInstanceOperator(ComputeEngineBaseOperator):
|
|
|
598
593
|
)
|
|
599
594
|
ComputeInstanceDetailsLink.persist(
|
|
600
595
|
context=context,
|
|
601
|
-
task_instance=self,
|
|
602
|
-
location_id=self.zone,
|
|
603
|
-
resource_id=self.resource_id,
|
|
604
596
|
project_id=self.project_id or hook.project_id,
|
|
605
597
|
)
|
|
606
598
|
hook.start_instance(zone=self.zone, resource_id=self.resource_id, project_id=self.project_id)
|
|
@@ -659,9 +651,6 @@ class ComputeEngineStopInstanceOperator(ComputeEngineBaseOperator):
|
|
|
659
651
|
)
|
|
660
652
|
ComputeInstanceDetailsLink.persist(
|
|
661
653
|
context=context,
|
|
662
|
-
task_instance=self,
|
|
663
|
-
location_id=self.zone,
|
|
664
|
-
resource_id=self.resource_id,
|
|
665
654
|
project_id=self.project_id or hook.project_id,
|
|
666
655
|
)
|
|
667
656
|
hook.stop_instance(zone=self.zone, resource_id=self.resource_id, project_id=self.project_id)
|
|
@@ -764,9 +753,6 @@ class ComputeEngineSetMachineTypeOperator(ComputeEngineBaseOperator):
|
|
|
764
753
|
self._validate_all_body_fields()
|
|
765
754
|
ComputeInstanceDetailsLink.persist(
|
|
766
755
|
context=context,
|
|
767
|
-
task_instance=self,
|
|
768
|
-
location_id=self.zone,
|
|
769
|
-
resource_id=self.resource_id,
|
|
770
756
|
project_id=self.project_id or hook.project_id,
|
|
771
757
|
)
|
|
772
758
|
hook.set_machine_type(
|
|
@@ -972,8 +958,6 @@ class ComputeEngineInsertInstanceTemplateOperator(ComputeEngineBaseOperator):
|
|
|
972
958
|
self.log.info("The %s Template already exists.", existing_template)
|
|
973
959
|
ComputeInstanceTemplateDetailsLink.persist(
|
|
974
960
|
context=context,
|
|
975
|
-
task_instance=self,
|
|
976
|
-
resource_id=self.resource_id,
|
|
977
961
|
project_id=self.project_id or hook.project_id,
|
|
978
962
|
)
|
|
979
963
|
return InstanceTemplate.to_dict(existing_template)
|
|
@@ -991,8 +975,6 @@ class ComputeEngineInsertInstanceTemplateOperator(ComputeEngineBaseOperator):
|
|
|
991
975
|
)
|
|
992
976
|
ComputeInstanceTemplateDetailsLink.persist(
|
|
993
977
|
context=context,
|
|
994
|
-
task_instance=self,
|
|
995
|
-
resource_id=self.resource_id,
|
|
996
978
|
project_id=self.project_id or hook.project_id,
|
|
997
979
|
)
|
|
998
980
|
return InstanceTemplate.to_dict(new_template)
|
|
@@ -1238,7 +1220,6 @@ class ComputeEngineCopyInstanceTemplateOperator(ComputeEngineBaseOperator):
|
|
|
1238
1220
|
)
|
|
1239
1221
|
ComputeInstanceTemplateDetailsLink.persist(
|
|
1240
1222
|
context=context,
|
|
1241
|
-
task_instance=self,
|
|
1242
1223
|
resource_id=self.body_patch["name"],
|
|
1243
1224
|
project_id=self.project_id or hook.project_id,
|
|
1244
1225
|
)
|
|
@@ -1259,7 +1240,6 @@ class ComputeEngineCopyInstanceTemplateOperator(ComputeEngineBaseOperator):
|
|
|
1259
1240
|
)
|
|
1260
1241
|
ComputeInstanceTemplateDetailsLink.persist(
|
|
1261
1242
|
context=context,
|
|
1262
|
-
task_instance=self,
|
|
1263
1243
|
resource_id=self.body_patch["name"],
|
|
1264
1244
|
project_id=self.project_id or hook.project_id,
|
|
1265
1245
|
)
|
|
@@ -1390,9 +1370,6 @@ class ComputeEngineInstanceGroupUpdateManagerTemplateOperator(ComputeEngineBaseO
|
|
|
1390
1370
|
self.log.info("Calling patch instance template with updated body: %s", patch_body)
|
|
1391
1371
|
ComputeInstanceGroupManagerDetailsLink.persist(
|
|
1392
1372
|
context=context,
|
|
1393
|
-
task_instance=self,
|
|
1394
|
-
location_id=self.zone,
|
|
1395
|
-
resource_id=self.resource_id,
|
|
1396
1373
|
project_id=self.project_id or hook.project_id,
|
|
1397
1374
|
)
|
|
1398
1375
|
return hook.patch_instance_group_manager(
|
|
@@ -1405,9 +1382,6 @@ class ComputeEngineInstanceGroupUpdateManagerTemplateOperator(ComputeEngineBaseO
|
|
|
1405
1382
|
# Idempotence achieved
|
|
1406
1383
|
ComputeInstanceGroupManagerDetailsLink.persist(
|
|
1407
1384
|
context=context,
|
|
1408
|
-
task_instance=self,
|
|
1409
|
-
location_id=self.zone,
|
|
1410
|
-
resource_id=self.resource_id,
|
|
1411
1385
|
project_id=self.project_id or hook.project_id,
|
|
1412
1386
|
)
|
|
1413
1387
|
return True
|
|
@@ -1552,10 +1526,7 @@ class ComputeEngineInsertInstanceGroupManagerOperator(ComputeEngineBaseOperator)
|
|
|
1552
1526
|
self.log.info("The %s Instance Group Manager already exists", existing_instance_group_manager)
|
|
1553
1527
|
ComputeInstanceGroupManagerDetailsLink.persist(
|
|
1554
1528
|
context=context,
|
|
1555
|
-
task_instance=self,
|
|
1556
|
-
resource_id=self.resource_id,
|
|
1557
1529
|
project_id=self.project_id or hook.project_id,
|
|
1558
|
-
location_id=self.zone,
|
|
1559
1530
|
)
|
|
1560
1531
|
return InstanceGroupManager.to_dict(existing_instance_group_manager)
|
|
1561
1532
|
self._field_sanitizer.sanitize(self.body)
|
|
@@ -1574,9 +1545,6 @@ class ComputeEngineInsertInstanceGroupManagerOperator(ComputeEngineBaseOperator)
|
|
|
1574
1545
|
)
|
|
1575
1546
|
ComputeInstanceGroupManagerDetailsLink.persist(
|
|
1576
1547
|
context=context,
|
|
1577
|
-
task_instance=self,
|
|
1578
|
-
location_id=self.zone,
|
|
1579
|
-
resource_id=self.resource_id,
|
|
1580
1548
|
project_id=self.project_id or hook.project_id,
|
|
1581
1549
|
)
|
|
1582
1550
|
return InstanceGroupManager.to_dict(new_instance_group_manager)
|
|
@@ -32,6 +32,7 @@ from google.cloud.datacatalog import (
|
|
|
32
32
|
TagTemplateField,
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
+
from airflow.exceptions import AirflowProviderDeprecationWarning
|
|
35
36
|
from airflow.providers.google.cloud.hooks.datacatalog import CloudDataCatalogHook
|
|
36
37
|
from airflow.providers.google.cloud.links.datacatalog import (
|
|
37
38
|
DataCatalogEntryGroupLink,
|
|
@@ -39,15 +40,23 @@ from airflow.providers.google.cloud.links.datacatalog import (
|
|
|
39
40
|
DataCatalogTagTemplateLink,
|
|
40
41
|
)
|
|
41
42
|
from airflow.providers.google.cloud.operators.cloud_base import GoogleCloudBaseOperator
|
|
43
|
+
from airflow.providers.google.common.deprecated import deprecated
|
|
42
44
|
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID
|
|
43
45
|
|
|
44
46
|
if TYPE_CHECKING:
|
|
45
47
|
from google.api_core.retry import Retry
|
|
46
48
|
from google.protobuf.field_mask_pb2 import FieldMask
|
|
47
49
|
|
|
48
|
-
from airflow.
|
|
50
|
+
from airflow.providers.common.compat.sdk import Context
|
|
49
51
|
|
|
50
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
|
+
)
|
|
51
60
|
class CloudDataCatalogCreateEntryOperator(GoogleCloudBaseOperator):
|
|
52
61
|
"""
|
|
53
62
|
Creates an entry.
|
|
@@ -154,10 +163,9 @@ class CloudDataCatalogCreateEntryOperator(GoogleCloudBaseOperator):
|
|
|
154
163
|
)
|
|
155
164
|
_, _, entry_id = result.name.rpartition("/")
|
|
156
165
|
self.log.info("Current entry_id ID: %s", entry_id)
|
|
157
|
-
|
|
166
|
+
context["ti"].xcom_push(key="entry_id", value=entry_id)
|
|
158
167
|
DataCatalogEntryLink.persist(
|
|
159
168
|
context=context,
|
|
160
|
-
task_instance=self,
|
|
161
169
|
entry_id=self.entry_id,
|
|
162
170
|
entry_group_id=self.entry_group,
|
|
163
171
|
location_id=self.location,
|
|
@@ -166,6 +174,13 @@ class CloudDataCatalogCreateEntryOperator(GoogleCloudBaseOperator):
|
|
|
166
174
|
return Entry.to_dict(result)
|
|
167
175
|
|
|
168
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
|
+
)
|
|
169
184
|
class CloudDataCatalogCreateEntryGroupOperator(GoogleCloudBaseOperator):
|
|
170
185
|
"""
|
|
171
186
|
Creates an EntryGroup.
|
|
@@ -268,10 +283,9 @@ class CloudDataCatalogCreateEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
268
283
|
|
|
269
284
|
_, _, entry_group_id = result.name.rpartition("/")
|
|
270
285
|
self.log.info("Current entry group ID: %s", entry_group_id)
|
|
271
|
-
|
|
286
|
+
context["ti"].xcom_push(key="entry_group_id", value=entry_group_id)
|
|
272
287
|
DataCatalogEntryGroupLink.persist(
|
|
273
288
|
context=context,
|
|
274
|
-
task_instance=self,
|
|
275
289
|
entry_group_id=self.entry_group_id,
|
|
276
290
|
location_id=self.location,
|
|
277
291
|
project_id=self.project_id or hook.project_id,
|
|
@@ -279,6 +293,14 @@ class CloudDataCatalogCreateEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
279
293
|
return EntryGroup.to_dict(result)
|
|
280
294
|
|
|
281
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
|
+
)
|
|
282
304
|
class CloudDataCatalogCreateTagOperator(GoogleCloudBaseOperator):
|
|
283
305
|
"""
|
|
284
306
|
Creates a tag on an entry.
|
|
@@ -403,10 +425,9 @@ class CloudDataCatalogCreateTagOperator(GoogleCloudBaseOperator):
|
|
|
403
425
|
|
|
404
426
|
_, _, tag_id = tag.name.rpartition("/")
|
|
405
427
|
self.log.info("Current Tag ID: %s", tag_id)
|
|
406
|
-
|
|
428
|
+
context["ti"].xcom_push(key="tag_id", value=tag_id)
|
|
407
429
|
DataCatalogEntryLink.persist(
|
|
408
430
|
context=context,
|
|
409
|
-
task_instance=self,
|
|
410
431
|
entry_id=self.entry,
|
|
411
432
|
entry_group_id=self.entry_group,
|
|
412
433
|
location_id=self.location,
|
|
@@ -415,6 +436,13 @@ class CloudDataCatalogCreateTagOperator(GoogleCloudBaseOperator):
|
|
|
415
436
|
return Tag.to_dict(tag)
|
|
416
437
|
|
|
417
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
|
+
)
|
|
418
446
|
class CloudDataCatalogCreateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
419
447
|
"""
|
|
420
448
|
Creates a tag template.
|
|
@@ -514,10 +542,9 @@ class CloudDataCatalogCreateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
514
542
|
)
|
|
515
543
|
_, _, tag_template = result.name.rpartition("/")
|
|
516
544
|
self.log.info("Current Tag ID: %s", tag_template)
|
|
517
|
-
|
|
545
|
+
context["ti"].xcom_push(key="tag_template_id", value=tag_template)
|
|
518
546
|
DataCatalogTagTemplateLink.persist(
|
|
519
547
|
context=context,
|
|
520
|
-
task_instance=self,
|
|
521
548
|
tag_template_id=self.tag_template_id,
|
|
522
549
|
location_id=self.location,
|
|
523
550
|
project_id=self.project_id or hook.project_id,
|
|
@@ -525,6 +552,14 @@ class CloudDataCatalogCreateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
525
552
|
return TagTemplate.to_dict(result)
|
|
526
553
|
|
|
527
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
|
+
)
|
|
528
563
|
class CloudDataCatalogCreateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
529
564
|
r"""
|
|
530
565
|
Creates a field in a tag template.
|
|
@@ -633,10 +668,9 @@ class CloudDataCatalogCreateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
633
668
|
result = tag_template.fields[self.tag_template_field_id]
|
|
634
669
|
|
|
635
670
|
self.log.info("Current Tag ID: %s", self.tag_template_field_id)
|
|
636
|
-
|
|
671
|
+
context["ti"].xcom_push(key="tag_template_field_id", value=self.tag_template_field_id)
|
|
637
672
|
DataCatalogTagTemplateLink.persist(
|
|
638
673
|
context=context,
|
|
639
|
-
task_instance=self,
|
|
640
674
|
tag_template_id=self.tag_template,
|
|
641
675
|
location_id=self.location,
|
|
642
676
|
project_id=self.project_id or hook.project_id,
|
|
@@ -644,6 +678,13 @@ class CloudDataCatalogCreateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
644
678
|
return TagTemplateField.to_dict(result)
|
|
645
679
|
|
|
646
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
|
+
)
|
|
647
688
|
class CloudDataCatalogDeleteEntryOperator(GoogleCloudBaseOperator):
|
|
648
689
|
"""
|
|
649
690
|
Deletes an existing entry.
|
|
@@ -729,6 +770,13 @@ class CloudDataCatalogDeleteEntryOperator(GoogleCloudBaseOperator):
|
|
|
729
770
|
self.log.info("Entry doesn't exists. Skipping.")
|
|
730
771
|
|
|
731
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
|
+
)
|
|
732
780
|
class CloudDataCatalogDeleteEntryGroupOperator(GoogleCloudBaseOperator):
|
|
733
781
|
"""
|
|
734
782
|
Deletes an EntryGroup.
|
|
@@ -811,6 +859,13 @@ class CloudDataCatalogDeleteEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
811
859
|
self.log.info("Entry doesn't exists. skipping")
|
|
812
860
|
|
|
813
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
|
+
)
|
|
814
869
|
class CloudDataCatalogDeleteTagOperator(GoogleCloudBaseOperator):
|
|
815
870
|
"""
|
|
816
871
|
Deletes a tag.
|
|
@@ -901,6 +956,13 @@ class CloudDataCatalogDeleteTagOperator(GoogleCloudBaseOperator):
|
|
|
901
956
|
self.log.info("Entry doesn't exists. skipping")
|
|
902
957
|
|
|
903
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
|
+
)
|
|
904
966
|
class CloudDataCatalogDeleteTagTemplateOperator(GoogleCloudBaseOperator):
|
|
905
967
|
"""
|
|
906
968
|
Deletes a tag template and all tags using the template.
|
|
@@ -988,6 +1050,13 @@ class CloudDataCatalogDeleteTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
988
1050
|
self.log.info("Tag Template doesn't exists. skipping")
|
|
989
1051
|
|
|
990
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
|
+
)
|
|
991
1060
|
class CloudDataCatalogDeleteTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
992
1061
|
"""
|
|
993
1062
|
Deletes a field in a tag template and all uses of that field.
|
|
@@ -1078,6 +1147,13 @@ class CloudDataCatalogDeleteTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
1078
1147
|
self.log.info("Tag Template field doesn't exists. skipping")
|
|
1079
1148
|
|
|
1080
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
|
+
)
|
|
1081
1157
|
class CloudDataCatalogGetEntryOperator(GoogleCloudBaseOperator):
|
|
1082
1158
|
"""
|
|
1083
1159
|
Gets an entry.
|
|
@@ -1161,7 +1237,6 @@ class CloudDataCatalogGetEntryOperator(GoogleCloudBaseOperator):
|
|
|
1161
1237
|
)
|
|
1162
1238
|
DataCatalogEntryLink.persist(
|
|
1163
1239
|
context=context,
|
|
1164
|
-
task_instance=self,
|
|
1165
1240
|
entry_id=self.entry,
|
|
1166
1241
|
entry_group_id=self.entry_group,
|
|
1167
1242
|
location_id=self.location,
|
|
@@ -1170,6 +1245,13 @@ class CloudDataCatalogGetEntryOperator(GoogleCloudBaseOperator):
|
|
|
1170
1245
|
return Entry.to_dict(result)
|
|
1171
1246
|
|
|
1172
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
|
+
)
|
|
1173
1255
|
class CloudDataCatalogGetEntryGroupOperator(GoogleCloudBaseOperator):
|
|
1174
1256
|
"""
|
|
1175
1257
|
Gets an entry group.
|
|
@@ -1256,7 +1338,6 @@ class CloudDataCatalogGetEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
1256
1338
|
)
|
|
1257
1339
|
DataCatalogEntryGroupLink.persist(
|
|
1258
1340
|
context=context,
|
|
1259
|
-
task_instance=self,
|
|
1260
1341
|
entry_group_id=self.entry_group,
|
|
1261
1342
|
location_id=self.location,
|
|
1262
1343
|
project_id=self.project_id or hook.project_id,
|
|
@@ -1264,6 +1345,13 @@ class CloudDataCatalogGetEntryGroupOperator(GoogleCloudBaseOperator):
|
|
|
1264
1345
|
return EntryGroup.to_dict(result)
|
|
1265
1346
|
|
|
1266
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
|
+
)
|
|
1267
1355
|
class CloudDataCatalogGetTagTemplateOperator(GoogleCloudBaseOperator):
|
|
1268
1356
|
"""
|
|
1269
1357
|
Gets a tag template.
|
|
@@ -1342,7 +1430,6 @@ class CloudDataCatalogGetTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
1342
1430
|
)
|
|
1343
1431
|
DataCatalogTagTemplateLink.persist(
|
|
1344
1432
|
context=context,
|
|
1345
|
-
task_instance=self,
|
|
1346
1433
|
tag_template_id=self.tag_template,
|
|
1347
1434
|
location_id=self.location,
|
|
1348
1435
|
project_id=self.project_id or hook.project_id,
|
|
@@ -1350,6 +1437,13 @@ class CloudDataCatalogGetTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
1350
1437
|
return TagTemplate.to_dict(result)
|
|
1351
1438
|
|
|
1352
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
|
+
)
|
|
1353
1447
|
class CloudDataCatalogListTagsOperator(GoogleCloudBaseOperator):
|
|
1354
1448
|
"""
|
|
1355
1449
|
Lists the tags on an Entry.
|
|
@@ -1441,7 +1535,6 @@ class CloudDataCatalogListTagsOperator(GoogleCloudBaseOperator):
|
|
|
1441
1535
|
)
|
|
1442
1536
|
DataCatalogEntryLink.persist(
|
|
1443
1537
|
context=context,
|
|
1444
|
-
task_instance=self,
|
|
1445
1538
|
entry_id=self.entry,
|
|
1446
1539
|
entry_group_id=self.entry_group,
|
|
1447
1540
|
location_id=self.location,
|
|
@@ -1450,6 +1543,13 @@ class CloudDataCatalogListTagsOperator(GoogleCloudBaseOperator):
|
|
|
1450
1543
|
return [Tag.to_dict(item) for item in result]
|
|
1451
1544
|
|
|
1452
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
|
+
)
|
|
1453
1553
|
class CloudDataCatalogLookupEntryOperator(GoogleCloudBaseOperator):
|
|
1454
1554
|
r"""
|
|
1455
1555
|
Get an entry by target resource name.
|
|
@@ -1532,7 +1632,6 @@ class CloudDataCatalogLookupEntryOperator(GoogleCloudBaseOperator):
|
|
|
1532
1632
|
project_id, location_id, entry_group_id, entry_id = result.name.split("/")[1::2]
|
|
1533
1633
|
DataCatalogEntryLink.persist(
|
|
1534
1634
|
context=context,
|
|
1535
|
-
task_instance=self,
|
|
1536
1635
|
entry_id=entry_id,
|
|
1537
1636
|
entry_group_id=entry_group_id,
|
|
1538
1637
|
location_id=location_id,
|
|
@@ -1541,6 +1640,13 @@ class CloudDataCatalogLookupEntryOperator(GoogleCloudBaseOperator):
|
|
|
1541
1640
|
return Entry.to_dict(result)
|
|
1542
1641
|
|
|
1543
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
|
+
)
|
|
1544
1650
|
class CloudDataCatalogRenameTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
1545
1651
|
"""
|
|
1546
1652
|
Renames a field in a tag template.
|
|
@@ -1631,13 +1737,19 @@ class CloudDataCatalogRenameTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
1631
1737
|
)
|
|
1632
1738
|
DataCatalogTagTemplateLink.persist(
|
|
1633
1739
|
context=context,
|
|
1634
|
-
task_instance=self,
|
|
1635
1740
|
tag_template_id=self.tag_template,
|
|
1636
1741
|
location_id=self.location,
|
|
1637
1742
|
project_id=self.project_id or hook.project_id,
|
|
1638
1743
|
)
|
|
1639
1744
|
|
|
1640
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
|
+
)
|
|
1641
1753
|
class CloudDataCatalogSearchCatalogOperator(GoogleCloudBaseOperator):
|
|
1642
1754
|
r"""
|
|
1643
1755
|
Searches Data Catalog for multiple resources like entries, tags that match a query.
|
|
@@ -1748,6 +1860,13 @@ class CloudDataCatalogSearchCatalogOperator(GoogleCloudBaseOperator):
|
|
|
1748
1860
|
return [SearchCatalogResult.to_dict(item) for item in result]
|
|
1749
1861
|
|
|
1750
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
|
+
)
|
|
1751
1870
|
class CloudDataCatalogUpdateEntryOperator(GoogleCloudBaseOperator):
|
|
1752
1871
|
"""
|
|
1753
1872
|
Updates an existing entry.
|
|
@@ -1850,7 +1969,6 @@ class CloudDataCatalogUpdateEntryOperator(GoogleCloudBaseOperator):
|
|
|
1850
1969
|
location_id, entry_group_id, entry_id = result.name.split("/")[3::2]
|
|
1851
1970
|
DataCatalogEntryLink.persist(
|
|
1852
1971
|
context=context,
|
|
1853
|
-
task_instance=self,
|
|
1854
1972
|
entry_id=self.entry_id or entry_id,
|
|
1855
1973
|
entry_group_id=self.entry_group or entry_group_id,
|
|
1856
1974
|
location_id=self.location or location_id,
|
|
@@ -1858,6 +1976,13 @@ class CloudDataCatalogUpdateEntryOperator(GoogleCloudBaseOperator):
|
|
|
1858
1976
|
)
|
|
1859
1977
|
|
|
1860
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
|
+
)
|
|
1861
1986
|
class CloudDataCatalogUpdateTagOperator(GoogleCloudBaseOperator):
|
|
1862
1987
|
"""
|
|
1863
1988
|
Updates an existing tag.
|
|
@@ -1964,7 +2089,6 @@ class CloudDataCatalogUpdateTagOperator(GoogleCloudBaseOperator):
|
|
|
1964
2089
|
location_id, entry_group_id, entry_id = result.name.split("/")[3:8:2]
|
|
1965
2090
|
DataCatalogEntryLink.persist(
|
|
1966
2091
|
context=context,
|
|
1967
|
-
task_instance=self,
|
|
1968
2092
|
entry_id=self.entry or entry_id,
|
|
1969
2093
|
entry_group_id=self.entry_group or entry_group_id,
|
|
1970
2094
|
location_id=self.location or location_id,
|
|
@@ -1972,6 +2096,13 @@ class CloudDataCatalogUpdateTagOperator(GoogleCloudBaseOperator):
|
|
|
1972
2096
|
)
|
|
1973
2097
|
|
|
1974
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
|
+
)
|
|
1975
2106
|
class CloudDataCatalogUpdateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
1976
2107
|
"""
|
|
1977
2108
|
Updates a tag template.
|
|
@@ -2074,13 +2205,19 @@ class CloudDataCatalogUpdateTagTemplateOperator(GoogleCloudBaseOperator):
|
|
|
2074
2205
|
location_id, tag_template_id = result.name.split("/")[3::2]
|
|
2075
2206
|
DataCatalogTagTemplateLink.persist(
|
|
2076
2207
|
context=context,
|
|
2077
|
-
task_instance=self,
|
|
2078
2208
|
tag_template_id=self.tag_template_id or tag_template_id,
|
|
2079
2209
|
location_id=self.location or location_id,
|
|
2080
2210
|
project_id=self.project_id or hook.project_id,
|
|
2081
2211
|
)
|
|
2082
2212
|
|
|
2083
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
|
+
)
|
|
2084
2221
|
class CloudDataCatalogUpdateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
2085
2222
|
"""
|
|
2086
2223
|
Updates a field in a tag template. This method cannot be used to update the field type.
|
|
@@ -2195,7 +2332,6 @@ class CloudDataCatalogUpdateTagTemplateFieldOperator(GoogleCloudBaseOperator):
|
|
|
2195
2332
|
location_id, tag_template_id = result.name.split("/")[3:6:2]
|
|
2196
2333
|
DataCatalogTagTemplateLink.persist(
|
|
2197
2334
|
context=context,
|
|
2198
|
-
task_instance=self,
|
|
2199
2335
|
tag_template_id=self.tag_template or tag_template_id,
|
|
2200
2336
|
location_id=self.location or location_id,
|
|
2201
2337
|
project_id=self.project_id or hook.project_id,
|