Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spark-connector add withDeleteEdge #2074

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs-2.0/nebula-spark-connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ val nebulaWriteEdgeConfig: WriteNebulaEdgeConfig = WriteNebulaEdgeConfig
df.write.nebula(config, nebulaWriteEdgeConfig).writeEdges()
```

默认写入模式为`insert`,可以通过`withWriteMode`配置修改为`update`:
默认写入模式为`insert`,可以通过`withWriteMode`配置修改为`update`或`delete`

```scala
val config = NebulaConnectionConfig
Expand Down Expand Up @@ -234,7 +234,8 @@ df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()
|`withUser` |否| NebulaGraph 用户名。若未开启[身份验证](7.data-security/1.authentication/1.authentication.md),无需配置用户名和密码。 |
|`withPasswd` |否| NebulaGraph 用户名对应的密码。 |
|`withBatch` |是| 一次写入的数据行数,默认值为`512`。当`withWriteMode`为`update`时,该参数的最大值为`512`。 |
|`withWriteMode`|否|写入模式。可选值为`insert`和`update`。默认为`insert`。|
|`withWriteMode`|否|写入模式。可选值为`insert`、`update`和`delete`。默认为`insert`。|
|`withDeleteEdge`|否|删除点时是否删除该点关联的边。默认为`false`。当`withWriteMode`为`delete`时生效。 |

- `WriteNebulaEdgeConfig`是写入边的配置,说明如下。

Expand All @@ -253,7 +254,7 @@ df.write.nebula(config, nebulaWriteVertexConfig).writeVertices()
|`withUser` |否| NebulaGraph 用户名。若未开启[身份验证](7.data-security/1.authentication/1.authentication.md),无需配置用户名和密码。 |
|`withPasswd` |否| NebulaGraph 用户名对应的密码。 |
|`withBatch` |是| 一次写入的数据行数,默认值为`512`。当`withWriteMode`为`update`时,该参数的最大值为`512`。 |
|`withWriteMode`|否|写入模式。可选值为`insert``update`。默认为`insert`。|
|`withWriteMode`|否|写入模式。可选值为`insert``update`和`delete`。默认为`insert`。|

### 示例代码

Expand Down