neo4j - neo4j-admin 导入“多行字段是非法的”
问题描述
我使用 neo4-admin 导入工具在 Neo4j 社区 4.1.2 中收到以下错误。
Caused by:ERROR in input
data source: BufferedCharSeeker[source:/home/ubuntu/workspace/neo4j-community-4.1.2/bin/../import/nodes.csv, position:24455, line:359]
in field: code:string:6
for header: [id:ID, labels:LABEL, type:string, flags:string, lineno:string, code:string, childnum:string, funcid:string, classname:string, namespace:string, endlineno:string, name:string, doccomment:string]
raw field value: 402
original error: At /home/ubuntu/workspace/neo4j-community-4.1.2/bin/../import/nodes.csv @ position 24455 - Multi-line fields are illegal in this context and so this might suggest that there's a field with a start quote, but a missing end quote. See /home/ubuntu/workspace/neo4j-community-4.1.2/bin/../import/nodes.csv @ position 24455.
我用 hexedit 检查了每个单字节:
- 第 359 行
- 字符 #24455
- 第 358 行
- 第 360 行
357,AST,string,,34,"/load.php",1,310,,"",,,
358,AST,AST_CALL,,37,,9,310,,"",,,
359,AST,AST_NAME,NAME_NOT_FQ,37,,0,310,,"",,,
360,AST,string,,37,"wp_check_php_mysql_versions",0,310,,"",,,
361,AST,AST_ARG_LIST,,37,,1,310,,"",,,
362,AST,AST_INCLUDE_OR_EVAL,EXEC_REQUIRE,40,,10,310,,"",,,
这是荒谬的情况:
- 不存在多行字段
- 不存在特殊字符
- 没有额外的 0A 字节
- 没有相对的“结束报价”,没有额外的“开始报价”
我在 Github 上发现了一些问题,但被引用到 Neo4j 的旧版本......可能是什么原因?
解决方案
最后我找到了导致异常的行。
异常原因是正确的,但行号完全错误。
我通过在命令中添加以下标志--multiline-fields=true
来 指出它。neo4j-admin import
推荐阅读
- arrays - bash 中的动态数组名
- angular - Ngx-print 不显示使用动态数据的第一次打印尝试的任何数据
- javascript - 计数值未显示在字计数器中
- neo4j - Neo4j 中的两个节点之间可以有数百万个有向关系吗?它会增加获取数据的延迟吗?
- java-native-interface - 关于 jni 和 ndk 的安全漏洞
- python - python中的管道/联合运算符
- redirect - HTML-Forwarding 仍然有效并且没有改变 - 这是什么原因?
- php - 如何从firebase laravel中带有id的列表中删除特定数据?
- arm - STM32G474引导加载程序退出
- reactjs - TS7051:参数有名称但没有类型。你是说'arg0:T'吗?