Skip to content

Commit

Permalink
modify importer bug and add new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
foesa-yang committed Dec 20, 2022
1 parent 606360e commit 6174865
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs-2.0/nebula-importer/config-with-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ files:
- path: ./student_with_header.csv

# 插入失败的数据文件存放路径,以便后面补写数据。
failDataPath: ./err/studenterr.csv
failDataPath: ./err/studenterr

# 单批次插入数据的语句数量。
batchSize: 10
Expand Down Expand Up @@ -159,7 +159,7 @@ files:

# 本示例第二个数据文件为边的数据。
- path: ./follow_with_header.csv
failDataPath: ./err/followerr.csv
failDataPath: ./err/followerr
batchSize: 10
limit: 10
inOrder: true
Expand Down
4 changes: 2 additions & 2 deletions docs-2.0/nebula-importer/config-without-header.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ files:
- path: ./student_without_header.csv

# 插入失败的数据文件存放路径,以便后面补写数据。
failDataPath: ./err/studenterr.csv
failDataPath: ./err/studenterr

# 单批次插入数据的语句数量。
batchSize: 10
Expand Down Expand Up @@ -151,7 +151,7 @@ files:

# 本示例第二个数据文件为边的数据。
- path: ./follow_without_header.csv
failDataPath: ./err/followerr.csv
failDataPath: ./err/followerr
batchSize: 10
limit: 10
inOrder: true
Expand Down
8 changes: 5 additions & 3 deletions docs-2.0/nebula-importer/use-importer.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ clientSettings:
workingDir: ./data/
logPath: ./err/test.log
files:
- path: ./student.csv
failDataPath: ./err/student.csv
- path: ./student
failDataPath: ./err/student
batchSize: 128
limit: 10
inOrder: false
Expand All @@ -216,11 +216,12 @@ files:
withHeader: false
withLabel: false
delimiter: ","
lazyQuotes: false
```

|参数|默认值|是否必须|说明|
|:---|:---|:---|:---|
|`workingDir`|-||在多个目录包含具有相同文件结构的数据,使用此参数在多个目录之间切换。例如,下面配置的 `path``failDataPath` 的值会自动更改为 `./data/student.csv``./data/err/student.csv`。参数可以是绝对的或相对的。|
|`workingDir`|-||在多个目录包含具有相同文件结构的数据,使用此参数在多个目录之间切换。例如,下面配置的 `path``failDataPath` 的值会自动更改为 `./data/student``./data/err/student`。参数可以是绝对的或相对的。|
|`logPath`|-||导入过程中的错误等日志信息输出的文件路径。|
|`files.path`|-||数据文件的存放路径,如果使用相对路径,则会将路径和当前配置文件的目录拼接。可以使用星号(\*)进行模糊匹配,导入多个名称相似的文件,但是文件的结构需要相同。|
|`files.failDataPath`|-||插入失败的数据文件存放路径,以便后面补写数据。|
Expand All @@ -231,6 +232,7 @@ files:
|`files.csv.withHeader`|`false`||是否有表头。详情请参见[关于 CSV 文件表头](#csv_header)。|
|`files.csv.withLabel`|`false`||是否有 LABEL。详情请参见[有表头配置说明](config-with-header.md)。|
|`files.csv.delimiter`|`","`||指定 csv 文件的分隔符。只支持一个字符的字符串分隔符。|
|`files.csv.lazyQuotes`|`false`||LazyQuotes设置为真时,一个引号可能会出现在非引号字段中,一个非双引号可能会出现在引号字段中。|

#### Schema 配置

Expand Down

0 comments on commit 6174865

Please sign in to comment.