Jelajahi Sumber

style: 清理 bin docstring 冗余 — hive-import 参数列表去重 + probe_table 去过度论证

- datax-hive-import-starter.py:模块 docstring 参数列表与 argparse help 重复,压成一句指向 -h
- datax-sync-template-gen.py:probe_table docstring 去掉关于全表 min 慢的过度论证段

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tianyu.chu 1 Minggu lalu
induk
melakukan
92d5a1721c
2 mengubah file dengan 1 tambahan dan 17 penghapusan
  1. 1 15
      bin/datax-hive-import-starter.py
  2. 0 2
      bin/datax-sync-template-gen.py

+ 1 - 15
bin/datax-hive-import-starter.py

@@ -1,20 +1,6 @@
 #!/usr/bin/env /usr/bin/python3
 # -*- coding:utf-8 -*-
-"""
-DataX hive-import 入口:目标=Hive(自动预建分区),对应 jobs/raw/ 场景。
-
-参数集(见 kb/90 §2.6):
-  -ini <file>          单 ini,可多次
-  -inis <dir>          ini 目录(非递归扫 *.ini),可多次
-  -start-date / -stop-date  yyyyMMdd
-  -host <hostname>     显式指定 worker
-  -random              加权随机选 worker
-  -parallel            并行(默认串行)
-  -skip-datax          只生成 json 不执行
-  -skip-partition      跳过 Hive 分区预建
-  -backfill            【高级用法】存量回填(见下方注释)
-  -channel / -byte / -record  L3 speed 覆盖
-"""
+"""DataX hive-import 入口:目标=Hive(自动预建分区),对应 jobs/raw/ 场景。参数见下方 argparse / -h。"""
 import argparse
 import os
 import sys

+ 0 - 2
bin/datax-sync-template-gen.py

@@ -112,8 +112,6 @@ def probe_table(conn, schema, table, full_rows):
     - PK:单/复合/无 + 是否自增(attidentity + default 表达式 nextval 双判)
     - create_time 主键序范围:单列自增 PK + create_time 存在;ORDER BY pk ASC/DESC LIMIT 1
     - update_time 抽样:TABLESAMPLE SYSTEM(1) LIMIT 1000,非空数 > 0 即视为业务方已启用
-      (不取最早非空时间——全表 min 在大表上慢;启用日期对决策意义不大,
-      只关心"是否启用"二元值)
     - 软删:full_rows 筛 'del' 子串(不区分大小写)
     """
     cur = conn.cursor()