-- ============================================================================ -- ai_clean_job / ai_clean_batch:行级失败与成功/失败统计(2026-10-22) -- -- 新增: -- job.row_rejected 必填空值/类型错误/函数异常/超长导致整行拒绝的行数 -- job.row_warned 已入库但含非必填错误的行数(单元格置空) -- job.row_unprocessed 失败任务里未处理到的行数 -- batch.loaded_rows / rejected_rows / unprocessed_rows / self_built_count -- -- 本脚本用于**已存在的** AI 元数据表;新环境直接按 ai_clean.sql 建表即可。 -- 全部语句幂等,可重复执行。 -- ============================================================================ alter table ai_clean_job add column if not exists row_rejected integer; alter table ai_clean_job add column if not exists row_warned integer; alter table ai_clean_job add column if not exists row_unprocessed integer; alter table ai_clean_batch add column if not exists loaded_rows bigint default 0; alter table ai_clean_batch add column if not exists rejected_rows bigint default 0; alter table ai_clean_batch add column if not exists unprocessed_rows bigint default 0; alter table ai_clean_batch add column if not exists self_built_count integer default 0;