Jelajahi Sumber

chore: 订单 ods init 改名 + UNION 简化 + 测试 SET 移除

(a) manual/backfill/ods_trd_card_group_order_info_init.sql →
    20260507_ods_trd_card_group_order_info_inc_d_history.sql,对齐 raw history 命名
(b) UNION ALL 内 his_o / inc_d 91 字段两遍改 SELECT *(schema 一致已查证)
(c) tests/integration/spark/idempotence/partition_overwrite_default.sql 顶部
    SET 注释化(conf/spark-defaults.conf 已默认 nonstrict,验证完后接管)

订单 ods init 一次性 DS 工作流创建脚本另落 workspace/20260507/(不入仓)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tianyu.chu 1 hari lalu
induk
melakukan
ad12300e51

+ 2 - 36
manual/backfill/ods_trd_card_group_order_info_init.sql → manual/backfill/20260507_ods_trd_card_group_order_info_inc_d_history.sql

@@ -111,43 +111,9 @@ FROM (
             ORDER BY update_time DESC
         ) AS rn
     FROM (
-        SELECT
-            id, group_info_id, merchant_id, user_id, shipping_address_id, purchase_count,
-            order_no, accounts_payable, actual_payment, payment_type, payment_time, coupon,
-            discount, status, remark, create_time, create_by, update_time, update_by,
-            payment_status, payment_status_desc, payment_success_time, del_flg, curier_company,
-            refund_fee, refund_time, anonymous, pick_up_type, ship_time, refund_success_time,
-            refund_recv_accout, refund_account, refund_request_source, card_price, act_price,
-            goods_price_json, payment_sub_type, team_first, refuse_status, prop1, prop2, prop3,
-            point, order_type, trade_amount, refund_type, refund_reason, evaluation,
-            user_refund_time, refund_status, merchant_refund_reason, point_deduct, shipping_cost,
-            merchant_remark, pay_record, order_sub_type, give_user_code, give_order_id, read_flag,
-            give_num, invoice_id, combination_no, open_self, refund_desc, goods_allocate,
-            close_payment_status, close_payment_time, finished_time, expire_time, settlement_amount,
-            platform_coupon, platform_discount, discount_amount, member_discount, shipping_free_id,
-            shipping_free_amount, discount_point, un_shipped_num, pre_un_shipped_num, wait_shipped_num,
-            pre_wait_shipped_num, refuse_time, refuse_notice, pickup_time, waring_type, waring_status,
-            point_type, delivery_end_time, serve_status, self_pickup_time, act_discount
-        FROM raw.raw_trd_card_group_order_info_his_o
+        SELECT * FROM raw.raw_trd_card_group_order_info_his_o
         UNION ALL
-        SELECT
-            id, group_info_id, merchant_id, user_id, shipping_address_id, purchase_count,
-            order_no, accounts_payable, actual_payment, payment_type, payment_time, coupon,
-            discount, status, remark, create_time, create_by, update_time, update_by,
-            payment_status, payment_status_desc, payment_success_time, del_flg, curier_company,
-            refund_fee, refund_time, anonymous, pick_up_type, ship_time, refund_success_time,
-            refund_recv_accout, refund_account, refund_request_source, card_price, act_price,
-            goods_price_json, payment_sub_type, team_first, refuse_status, prop1, prop2, prop3,
-            point, order_type, trade_amount, refund_type, refund_reason, evaluation,
-            user_refund_time, refund_status, merchant_refund_reason, point_deduct, shipping_cost,
-            merchant_remark, pay_record, order_sub_type, give_user_code, give_order_id, read_flag,
-            give_num, invoice_id, combination_no, open_self, refund_desc, goods_allocate,
-            close_payment_status, close_payment_time, finished_time, expire_time, settlement_amount,
-            platform_coupon, platform_discount, discount_amount, member_discount, shipping_free_id,
-            shipping_free_amount, discount_point, un_shipped_num, pre_un_shipped_num, wait_shipped_num,
-            pre_wait_shipped_num, refuse_time, refuse_notice, pickup_time, waring_type, waring_status,
-            point_type, delivery_end_time, serve_status, self_pickup_time, act_discount
-        FROM raw.raw_trd_card_group_order_info_inc_d
+        SELECT * FROM raw.raw_trd_card_group_order_info_inc_d
     ) u
 ) t
 WHERE t.rn = 1;

+ 2 - 2
tests/integration/spark/idempotence/partition_overwrite_default.sql

@@ -4,8 +4,8 @@
 
 -- Hive 动态分区前置(不设动态分区 INSERT 跑不起来;这两条与本测试目标
 -- spark.sql.sources.partitionOverwriteMode 无关,是底层执行必需条件)
-set hive.exec.dynamic.partition=true;
-set hive.exec.dynamic.partition.mode=nonstrict;
+-- set hive.exec.dynamic.partition=true;
+-- set hive.exec.dynamic.partition.mode=nonstrict;
 
 CREATE DATABASE IF NOT EXISTS test;