From 436c613a7952630c41aa99611f0d1eaee3144a66 Mon Sep 17 00:00:00 2001 From: Wesley Dawson Date: Thu, 31 Oct 2024 09:38:21 -0700 Subject: [PATCH] chore: remove main archive step --- dags/copy_deduplicate.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/dags/copy_deduplicate.py b/dags/copy_deduplicate.py index 03caebf3..72ed303f 100644 --- a/dags/copy_deduplicate.py +++ b/dags/copy_deduplicate.py @@ -363,30 +363,3 @@ with models.DAG( ) copy_deduplicate_all >> telemetry_derived__core_clients_first_seen__v1 - - archive_partition_id = ( - "{{ macros.ds_format(macros.ds_add(ds, -" - # 37 months = 3 years + 1 leap day + 31 days (1 month) - + str(365 * 3 + 1 + 31) - + '), "%Y-%m-%d", "%Y%m%d") }}' - ) - precheck_query = ( - "ASSERT (SELECT total_rows FROM " - "moz-fx-data-shared-prod.telemetry_stable.INFORMATION_SCHEMA.PARTITIONS " - 'WHERE table_name = "main_v5" ' - f'AND partition_id = "{archive_partition_id}") > 0 ' - 'AS "refusing to archive empty partition"' - ) - main_v5 = "moz-fx-data-shared-prod:telemetry_stable.main_v5" - archive_main = GKEPodOperator( - reattach_on_restart=True, - task_id="archive_main", - cmds=["bash", "-x", "-c"], - arguments=[ - f"bq query '{precheck_query}' &&" - f"bq cp -f {main_v5}'$'{archive_partition_id} " - f"{main_v5}_archive'$'{archive_partition_id} && " - f"bq rm -f {main_v5}'$'{archive_partition_id}" - ], - image="gcr.io/moz-fx-data-airflow-prod-88e0/bigquery-etl:latest", - )