Skip to content

Commit 1b0e878

Browse files
committed
docs: clarify CSV non-adjacent column limitation
1 parent 739971c commit 1b0e878

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/cn/guides/20-self-hosted/04-references/http-streaming-load.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ X-Databend-SQL: insert into demo.people(name,age,city) values (?, ?, 'BJ') from
8484
```text
8585
X-Databend-SQL: insert into demo.people(id,name) from @_databend_load file_format=(type=csv skip_header=1 error_on_column_count_mismatch=false)
8686
```
87+
- 这个能力只适用于“取前 N 列”的场景。Streaming load 按字段位置映射,不支持挑选非连续列(例如 `id,name,age` 想只导入 `id` 和 `age`)。
88+
- 解决思路:先在本地把 CSV 预处理成只包含需要的列,或先上传到 stage 再用 `SELECT $1, $3 FROM @stage/file.csv` 这种方式做列投影。
8789
8890
**cURL 模板:**
8991

docs/en/guides/20-self-hosted/04-references/http-streaming-load.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ X-Databend-SQL: insert into demo.people(name,age,city) values (?, ?, 'BJ') from
8484
```text
8585
X-Databend-SQL: insert into demo.people(id,name) from @_databend_load file_format=(type=csv skip_header=1 error_on_column_count_mismatch=false)
8686
```
87+
- This only helps when you want the **first N fields**. Streaming load maps CSV fields by position and does not support selecting non-adjacent fields (for example, `id,name,age` → insert only `id` and `age`).
88+
- Workaround: preprocess the CSV to keep only the needed columns, or load via stage and project columns (for example, `SELECT $1, $3 FROM @stage/file.csv`).
8789
8890
**cURL template:**
8991

0 commit comments

Comments
 (0)