Commit c0e31761 by luoqi

feat(cold-import): 去 dev cohort LIMIT 100,准备 demo 全量灌库

manifest.yaml 6 处 LIMIT 100 OFFSET 100 全删,fact_client_out 主查询
顺手去 ORDER BY(全量场景下纯浪费一次 sort)。

预期:13 万患者全量灌入,首跑耗时 10-30 min。
parent bcb406a0
......@@ -89,7 +89,7 @@ sql_source:
# SQL 最朴素化 — host(DW)给的数据范围就是 PAC 该消化的范围。
# PAC 这边不预设诊所 / brand / 时间过滤,数据来什么就是什么。
# 仅保留 cohort LIMIT(测试期控量,真上量去掉)+ 必要业务过滤(退费状态)。
# dev 期的 cohort LIMIT 已去除 → 全量;只保留必要业务过滤(退费状态)。
# cohort 用 (patient_id, brand) 复合键 — patient_id 跨 brand 撞车,需带 brand 才精确。
queries:
# ── 患者主档 ──
......@@ -97,8 +97,6 @@ sql_source:
SELECT *
FROM dw_group.fact_client_out
WHERE last_visit_time IS NOT NULL
ORDER BY last_visit_time DESC
LIMIT 100 OFFSET 100
# ── 预约(全部状态;in_time NULL 的在 transforms.route 时分流跳过 encounter) ──
fact_appointment_out: |
......@@ -107,7 +105,6 @@ sql_source:
WHERE (patient_id, brand) IN (
SELECT patient_id, brand FROM dw_group.fact_client_out
WHERE last_visit_time IS NOT NULL
ORDER BY last_visit_time DESC LIMIT 100 OFFSET 100
)
# ── EMR 全字段(自由文本 + diag/treat_plan JSON,后续 transforms 拆) ──
......@@ -121,7 +118,6 @@ sql_source:
WHERE (patient_id, brand) IN (
SELECT patient_id, brand FROM dw_group.fact_client_out
WHERE last_visit_time IS NOT NULL
ORDER BY last_visit_time DESC LIMIT 100 OFFSET 100
)
# ── 结算明细(已做治疗反推;退费/未完成结算行 PAC 不消费) ──
......@@ -140,7 +136,6 @@ sql_source:
AND (patient_id, brand) IN (
SELECT patient_id, brand FROM dw_group.fact_client_out
WHERE last_visit_time IS NOT NULL
ORDER BY last_visit_time DESC LIMIT 100 OFFSET 100
)
# ── 退费明细(独立 fact_type refund_record;LTV 算法 - refund;S5 闭环风控)──
......@@ -158,7 +153,6 @@ sql_source:
AND (patient_id, brand) IN (
SELECT patient_id, brand FROM dw_group.fact_client_out
WHERE last_visit_time IS NOT NULL
ORDER BY last_visit_time DESC LIMIT 100 OFFSET 100
)
# ── 支付通道明细(17 列 pay_*,后续 transforms.pick_first_nonzero 推) ──
......@@ -170,7 +164,6 @@ sql_source:
AND (patient_id, brand) IN (
SELECT patient_id, brand FROM dw_group.fact_client_out
WHERE last_visit_time IS NOT NULL
ORDER BY last_visit_time DESC LIMIT 100 OFFSET 100
)
# ─────────────────────────────────────────────────────────────
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment