From 886fccb1b1f2cc348aed52e73521078738c15b29 Mon Sep 17 00:00:00 2001 From: foesa <35463247+foesa-yang@users.noreply.github.com> Date: Thu, 2 Feb 2023 14:20:00 +0800 Subject: [PATCH 1/2] Update use-importer.md --- docs-2.0/nebula-importer/use-importer.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs-2.0/nebula-importer/use-importer.md b/docs-2.0/nebula-importer/use-importer.md index e5986a7c64a..e2c6746dc67 100644 --- a/docs-2.0/nebula-importer/use-importer.md +++ b/docs-2.0/nebula-importer/use-importer.md @@ -214,6 +214,7 @@ files: withHeader: false withLabel: false delimiter: "," + lazyQuotes: false ``` |Parameter|Default value|Required|Description| @@ -229,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.| +|`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 @@ -252,14 +254,23 @@ schema: - name: age type: int index: 2 + - name: name + type: string + index: 1 - name: gender type: string + - name: phone + type: string + nullable: true + - name: wechat + type: string + nullable: true + nullValue: "__NULL__" ``` |Parameter|Default value|Required|Description| |:---|:---|:---|:---| |`files.schema.type`|-|Yes|Schema type. Possible values are `vertex` and `edge`.| -|`files.schema.vertex.vid.type`|-|No|The data type of the vertex ID. Possible values are `int` and `string`.| |`files.schema.vertex.vid.index`|-|No|The vertex ID corresponds to the column number in the CSV file.| |`files.schema.vertex.vid.function`|-|No|Functions to generate the VIDs. Currently, we only support function `hash`.| |`files.schema.vertex.vid.prefix`|-|No|Add prefix to the original vid. When function is specified also, `prefix` is applied to the original vid before `function`.| @@ -267,6 +278,10 @@ schema: |`files.schema.vertex.tags.props.name`|-|Yes|Tag property name, which must match the Tag property in the NebulaGraph.| |`files.schema.vertex.tags.props.type`|-|Yes|Property data type, supporting `bool`,`int`,`float`,`double`,`string`,`time`,`timestamp`,`date`,`datetime`,`geography`,`geography(point)`,`geography(linestring)` and `geography(polygon)`.| |`files.schema.vertex.tags.props.index`|-|No|Property corresponds to the sequence number of the column in the CSV file.| +|`files.schema.vertex.tags.props.nullable`|`false`|No|Whether this prop property can be `NULL`, optional values is `true` or `false`.| +|`files.schema.vertex.tags.props.nullValue`|`""`|No|Ignored when nullable is false. The property is set to NULL when the value is equal to nullValue.| +|`files.schema.vertex.tags.props.alternativeIndices`|-|No| Ignored when `nullable` is `false`. The property is fetched from csv according to the indices in order until not equal to `nullValue`.| +|`files.schema.vertex.tags.props.defaultValue`|-|No| Ignored when `nullable` is false. The property default value, when all the values obtained by `index` and `alternativeIndices` are `nullValue`.| !!! note The sequence numbers of the columns in the CSV file start from 0, that is, the sequence numbers of the first column are 0, and the sequence numbers of the second column are 1. From e6f3ef7fd433b9d799d4b3e701f875f7926c3a26 Mon Sep 17 00:00:00 2001 From: "abby.huang" <78209557+abby-cyber@users.noreply.github.com> Date: Fri, 3 Feb 2023 11:27:01 +0800 Subject: [PATCH 2/2] Update docs-2.0/nebula-importer/use-importer.md --- docs-2.0/nebula-importer/use-importer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-2.0/nebula-importer/use-importer.md b/docs-2.0/nebula-importer/use-importer.md index e2c6746dc67..9bbcc9fa392 100644 --- a/docs-2.0/nebula-importer/use-importer.md +++ b/docs-2.0/nebula-importer/use-importer.md @@ -280,7 +280,7 @@ schema: |`files.schema.vertex.tags.props.index`|-|No|Property corresponds to the sequence number of the column in the CSV file.| |`files.schema.vertex.tags.props.nullable`|`false`|No|Whether this prop property can be `NULL`, optional values is `true` or `false`.| |`files.schema.vertex.tags.props.nullValue`|`""`|No|Ignored when nullable is false. The property is set to NULL when the value is equal to nullValue.| -|`files.schema.vertex.tags.props.alternativeIndices`|-|No| Ignored when `nullable` is `false`. The property is fetched from csv according to the indices in order until not equal to `nullValue`.| +|`files.schema.vertex.tags.props.alternativeIndices`|-|No| Ignored when `nullable` is `false`. When the property value is not `nullValue`, the value is fetched from csv according to the index sequence.| |`files.schema.vertex.tags.props.defaultValue`|-|No| Ignored when `nullable` is false. The property default value, when all the values obtained by `index` and `alternativeIndices` are `nullValue`.| !!! note