检查管道是否存在
我们可以通过查找名称来检查流水线是否在目录中可用。
语法
检查流水线是否存在于目录中
CALL gds.pipeline.exists(pipelineName: String)
YIELD
pipelineName: String,
pipelineType: String,
exists: Boolean
| 名称 | 类型 | 默认 | 可选 | 描述 |
|---|---|---|---|---|
pipelineName |
字符串 |
|
否 |
流水线的名称。 |
| 名称 | 类型 | 描述 |
|---|---|---|
pipelineName |
字符串 |
流水线的名称。 |
pipelineType |
字符串 |
流水线的类型。 |
exists |
布尔值 |
如果流水线存在于流水线目录中,则返回 True。 |
示例
在本节中,我们将演示 gds.pipeline.exists 的用法。为了举例说明,我们创建一个节点分类流水线并检查其是否存在。
创建节点分类训练流水线
CALL gds.beta.pipeline.nodeClassification.create('pipe')
检查流水线是否存在于目录中
CALL gds.pipeline.exists('pipe')
| pipelineName | pipelineType | exists |
|---|---|---|
"pipe" |
“节点分类训练流水线” |
true |