在前后端开发联调前 的提交20260223

This commit is contained in:
Neo
2026-02-23 23:02:20 +08:00
parent 254ccb1e77
commit fafc95e64c
1142 changed files with 10366960 additions and 36957 deletions

View File

@@ -7,7 +7,6 @@
3. Layers 模式:通过 --layers 自由组合 ETL 层ODS,DWD,DWS,INDEX
注意:--flow 和 --layers 互斥,不能同时使用。
--pipeline 是 --flow 的已弃用别名,使用时会输出 DeprecationWarning。
处理模式说明(--processing-mode
- increment_only仅增量 - 只执行增量数据处理
@@ -75,6 +74,7 @@ PROCESSING_MODE_CHOICES = [
"increment_only", # 仅增量
"verify_only", # 校验并修复(跳过增量)
"increment_verify", # 增量 + 校验并修复
"full_window", # 全窗口处理(用 API 返回数据的时间范围,处理所有层,无需校验)
]
# 时间窗口切分选项
@@ -150,9 +150,6 @@ def parse_args():
# 仅执行 DWS + INDEX 层
python -m cli.main --layers DWS,INDEX
# --pipeline 仍可用(已弃用,建议迁移到 --flow
python -m cli.main --pipeline api_full
""",
)
@@ -167,16 +164,9 @@ def parse_args():
choices=FLOW_CHOICES,
help="Flow 类型(与 --layers 互斥api_ods, api_ods_dwd, api_full, ods_dwd, dwd_dws, dwd_dws_index, dwd_index",
)
# --pipeline 作为已弃用别名,映射到独立 dest 以便检测使用
parser.add_argument(
"--pipeline",
choices=FLOW_CHOICES,
dest="pipeline_deprecated",
help="[已弃用] 请使用 --flow。功能与 --flow 相同,使用时输出 DeprecationWarning",
)
parser.add_argument(
"--layers",
help="ETL 层自由组合逗号分隔ODS,DWD,DWS,INDEX与 --flow/--pipeline 互斥",
help="ETL 层自由组合逗号分隔ODS,DWD,DWS,INDEX与 --flow 互斥",
)
parser.add_argument(
"--processing-mode",
@@ -409,6 +399,10 @@ def build_cli_overrides(args) -> dict:
if args.allow_empty_advance:
overrides.setdefault("run", {})["allow_empty_result_advance"] = True
# 处理模式(写入 config 供 ODS 任务层读取)
if hasattr(args, "processing_mode") and args.processing_mode:
overrides.setdefault("run", {})["processing_mode"] = args.processing_mode
# 强制全量更新
if args.force_full:
overrides.setdefault("run", {})["force_full_update"] = True
@@ -451,19 +445,7 @@ def main():
logger = setup_logging()
args = parse_args()
# --pipeline 弃用别名处理:合并到 args.flow参数名保留以兼容旧调用
if args.pipeline_deprecated:
import warnings
warnings.warn(
"--pipeline 参数已弃用,请使用 --flow",
DeprecationWarning,
stacklevel=2,
)
if args.flow:
print("错误: --pipeline 和 --flow 不能同时指定", file=sys.stderr)
sys.exit(2)
args.flow = args.pipeline_deprecated
# CHANGE [2026-02-20] intent: 移除 --pipeline 弃用别名,统一使用 --flow
# --layers 和 --flow 互斥校验
if getattr(args, "layers", None) and args.flow:
print("错误: --layers 和 --flow 互斥,请只指定其中一个", file=sys.stderr)
@@ -552,7 +534,7 @@ def main():
db_conn, api_client, logger,
)
result = runner.run(
pipeline=args.flow,
flow=args.flow,
processing_mode=args.processing_mode,
data_source=data_source,
window_start=window_start,
@@ -610,7 +592,7 @@ def main():
db_conn, api_client, logger,
)
result = runner.run(
pipeline=None,
flow=None,
layers=layers,
processing_mode=args.processing_mode,
data_source=data_source,