在前后端开发联调前 的提交20260223
This commit is contained in:
@@ -84,7 +84,13 @@ def _fetch_pk_columns(conn, schema: str, table: str) -> list[str]:
|
||||
def _build_report_path(out_arg: str | None) -> Path:
|
||||
if out_arg:
|
||||
return Path(out_arg)
|
||||
reports_dir = PROJECT_ROOT / "reports"
|
||||
env_root = os.environ.get("ETL_REPORT_ROOT")
|
||||
if not env_root:
|
||||
raise KeyError(
|
||||
"环境变量 ETL_REPORT_ROOT 未定义。"
|
||||
"请在根 .env 中配置,参考 docs/deployment/EXPORT-PATHS.md"
|
||||
)
|
||||
reports_dir = Path(env_root)
|
||||
reports_dir.mkdir(parents=True, exist_ok=True)
|
||||
ts = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
return reports_dir / f"ods_snapshot_dedupe_{ts}.json"
|
||||
|
||||
@@ -106,7 +106,13 @@ def _iter_rows(
|
||||
def _build_report_path(out_arg: str | None) -> Path:
|
||||
if out_arg:
|
||||
return Path(out_arg)
|
||||
reports_dir = PROJECT_ROOT / "reports"
|
||||
env_root = os.environ.get("ETL_REPORT_ROOT")
|
||||
if not env_root:
|
||||
raise KeyError(
|
||||
"环境变量 ETL_REPORT_ROOT 未定义。"
|
||||
"请在根 .env 中配置,参考 docs/deployment/EXPORT-PATHS.md"
|
||||
)
|
||||
reports_dir = Path(env_root)
|
||||
reports_dir.mkdir(parents=True, exist_ok=True)
|
||||
ts = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
return reports_dir / f"ods_content_hash_repair_{ts}.json"
|
||||
|
||||
Reference in New Issue
Block a user