Neo4j 连接

Neo4j 连接类型使用 Neo4j Python 客户端 提供与 Neo4j 数据库的连接。

配置连接

主机 (必需)

要连接的主机。

模式 (可选)

指定要在数据库中使用的模式名称。

登录 (必需)

指定用于连接的用户名。

密码 (必需)

指定用于连接的密码。

额外参数 (可选)

指定可在 Neo4j 连接中使用的额外参数 (以 json 字典形式)。

支持以下额外参数
  • encrypted: 设置 GraphDatabase.driver 的 encrypted=True/False,对于 Neo4j Aura 设置为 True

  • neo4j_scheme: 指定方案为 neo4j://,默认为 bolt://

  • certs_self_signed: 设置 URI 方案以支持自签名证书(neo4j+ssc://)

  • certs_trusted_ca: 设置 URI 方案仅支持受信任的 CA(neo4j+s://)

“额外参数” 字段示例

{
   "encrypted": true,
   "neo4j_scheme": true,
   "certs_self_signed": true,
   "certs_trusted_ca": false
}

在环境变量中指定连接时,应使用 URI 语法。

请注意,URI 的所有组成部分都应进行 URL 编码。

例如

export AIRFLOW_CONN_NEO4J_DEFAULT='neo4j://username:password@https%3A%2F%2Fneo4jhost/neo4j-schema?encrypted=true&neo4j_scheme=true&certs_self_signed=true&certs_trusted_ca=false'

本条目是否有用?