检查管道是否存在

我们可以通过查找管道名称来检查它是否在目录中可用。

语法

检查管道是否在目录中存在
CALL gds.pipeline.exists(pipelineName: String)
YIELD
    pipelineName: String,
    pipelineType: String,
    exists: Boolean
表 1. 参数
名称 类型 默认值 可选 描述

pipelineName

字符串

不适用

管道的名称。

表 2. 结果
名称 类型 描述

pipelineName

字符串

管道的名称。

pipelineType

字符串

管道的类型。

exists

布尔值

如果管道存在于管道目录中,则为 True。

示例

在本节中,我们将演示 gds.pipeline.exists 的用法。为了说明这一点,我们创建一个 节点分类管道 并检查其是否存在。

创建节点分类训练管道
CALL gds.beta.pipeline.nodeClassification.create('pipe')
检查管道是否在目录中存在
CALL gds.pipeline.exists('pipe')
表 3. 结果
pipelineName pipelineType exists

"pipe"

"节点分类训练管道"

true

© . All rights reserved.