Files
SnapOtter/apps/docs/zh-TW/tools/files/merge-csvs.md
T
SnapOtterandGitHub 4963ab3bbd feat(docs-i18n): translate all documentation into 20 languages
All 181 docs markdown files translated into 20 languages (apps/docs/<locale>/**). Companion to the i18n code PR; admin-merged because the file count exceeds GitHub's per-PR CI trigger limit. Validated by pnpm i18n:check (all surfaces, 0 stale/missing) and a clean all-locale docs build.
2026-07-11 13:52:47 +08:00

1.4 KiB

description, i18n_source_hash, i18n_provenance, i18n_output_hash
description i18n_source_hash i18n_provenance i18n_output_hash
將多個欄位相符的 CSV 或 TSV 檔案合併為一個。 109b5f399ac8 human f5e59e94d33e

Merge CSVs

將多個欄位相符的 CSV 或 TSV 檔案合併為單一檔案。所有輸入檔案必須具有相同的欄位標頭。

API Endpoint

POST /api/v1/tools/files/merge-csvs

接受包含兩個以上 CSV 檔案的 multipart form data。不需要 settings 欄位。

Parameters

此工具沒有可設定的參數。上傳 2 至 20 個欄位標頭相符的 CSV 或 TSV 檔案。

Example Request

curl -X POST http://localhost:1349/api/v1/tools/files/merge-csvs \
  -H "Authorization: Bearer si_your-api-key" \
  -F "file=@january.csv" \
  -F "file=@february.csv" \
  -F "file=@march.csv"

Example Response

{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "downloadUrl": "/api/v1/download/a1b2c3d4-e5f6-7890-abcd-ef1234567890/merged.csv",
  "originalSize": 30000,
  "processedSize": 28500
}

Notes

  • 需要 2 至 20 個輸入檔案。
  • 所有檔案必須共用相同的欄位標頭。若欄位不符,合併將會失敗。
  • 標頭列在輸出中僅包含一次;所有檔案的資料列會依上傳順序串接。
  • CSV 與 TSV 檔案皆可接受,但單一請求中的所有檔案應使用相同的分隔符號。