Explorar o código

fix: 订单 ods init SQL 加动态分区上限 SET(init 场景专属)

跨 1632 个 dt 撞 hive 默认上限 1000/100。两条 SET 加在 init SQL 顶部
(max.dynamic.partitions=2000 / pernode=200),scope 精确不污染默认配置
(日常调度每次写 1 个 dt 不撞)。pernode 指 Spark task 节点不是物理 worker。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
tianyu.chu hai 21 horas
pai
achega
62f1c6973f

+ 6 - 0
manual/backfill/20260507_ods_trd_card_group_order_info_inc_d_init.sql

@@ -8,6 +8,12 @@
 --       his_o + inc_d schema 完全一致(91 字段 STRING),SELECT * UNION ALL 安全;
 --       update_time 为空的行落入 __HIVE_DEFAULT_PARTITION__(非阻塞,下游自行处理)
 
+-- 动态分区上限:本表跨 1632 dt(2021-10-28 ~ 2026-04-30)撞 hive 默认 1000/100。
+-- pernode 指 Spark task 节点(spark.sql.shuffle.partitions=200)不是物理 worker。
+-- 仅 init 场景需要,日常调度写 1 个 dt 不撞,故只在本 SQL 内 SET 不入 conf 默认。
+set hive.exec.max.dynamic.partitions=2000;
+set hive.exec.max.dynamic.partitions.pernode=200;
+
 INSERT OVERWRITE TABLE ods.ods_trd_card_group_order_info_inc_d PARTITION (dt)
 SELECT
     CAST(id                        AS BIGINT)        AS id,