Skip to content

Commit

Permalink
modify importer bug and add new feature (#1826)
Browse files Browse the repository at this point in the history
  • Loading branch information
foesa-yang committed Dec 23, 2022
1 parent 15c2de4 commit fe9246f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 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

# Insert the failed data file storage path, so that data can be written later.
failDataPath: ./err/studenterr.csv
failDataPath: ./err/studenterr

# The number of statements inserting data in a batch.
batchSize: 10
Expand Down Expand Up @@ -159,7 +159,7 @@ files:

# The second data file in this example is edge data.
- 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

# Insert the failed data file storage path, so that data can be written later.
failDataPath: ./err/studenterr.csv
failDataPath: ./err/studenterr

# The number of statements inserting data in a batch.
batchSize: 10
Expand Down Expand Up @@ -151,7 +151,7 @@ files:

# The second data file in this example is edge data.
- path: ./follow_without_header.csv
failDataPath: ./err/followerr.csv
failDataPath: ./err/followerr
batchSize: 10
limit: 10
inOrder: true
Expand Down
24 changes: 14 additions & 10 deletions docs-2.0/nebula-importer/use-importer.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,25 @@ File configuration Stores the configuration of data files and logs, and details
The example configuration is as follows:

```yaml
logPath: ./err/test.log
files:
- path: ./student_without_header.csv
failDataPath: ./err/studenterr.csv
batchSize: 128
limit: 10
inOrder: false
workingDir: ./data/
logPath: ./err/test.log
files:
- path: ./student.csv
failDataPath: ./err/student
batchSize: 128
limit: 10
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
delimiter: ","
withHeader: false
withLabel: false
delimiter: ","
lazyQuotes: false
```

|Parameter|Default value|Required|Description|
|:---|:---|:---|:---|
|`workingDir`|-|No| Use this parameter to switch between multiple directories where multiple directories contain data with the same file structure. For example, the values of `path` and `failDataPath` configured below will automatically change to `./data/student` and `./data/err/student`. The parameters can be absolute or relative.|
|`logPath`|-|No|Path for exporting log information, such as errors during import.|
|`files.path`|-|Yes|Path for storing data files. If a relative path is used, the path is merged with the current configuration file directory. You can use an asterisk (\*) for fuzzy matching to import multiple files with similar names, but the files need to be the same structure.|
|`files.failDataPath`|-|Yes|Insert the failed data file storage path, so that data can be written later.|
Expand All @@ -227,6 +230,7 @@ files:
|`files.csv.withHeader`|`false`|Yes|Whether there is a header.|
|`files.csv.withLabel`|`false`|Yes|Whether there is a label.|
|`files.csv.delimiter`|`","`|Yes|Specifies the delimiter for the CSV file. A string delimiter that supports only one character.|
|`files.csv.lazyQuotes`|`false`|No|If `lazyQuotes` is true, a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field.|

#### Schema configuration

Expand Down

0 comments on commit fe9246f

Please sign in to comment.