gpt4 book ai didi

mysql - OrientDB 变压器 'jdbc' 未找到

转载 作者:行者123 更新时间:2023-11-29 12:21:51 27 4
gpt4 key购买 nike

我最近安装了 OrientDB 并尝试使用 ETL 模块创建导入。

在 OS X 上运行,我使用自制软件安装了 orientDB。

我创建了以下 ETL 脚本:

{
"config": {
"log": "debug"
},
"begin": [
],
"extractor" : {
"row": {}
},
"transformers": [
{ "jdbc": {
"driver": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://localhost/dev_database",
"userName": "root",
"userPassword": "",
"query": "select * from users limit 20"
}
},
{ "vertex": { "class": "V" } }
],
"loader": {
"orientdb": {
"dbURL": "plocal:../databases/ETLDemo",
"dbUser": "admin",
"dbPassword": "admin",
"dbAutoCreate": true,
"tx": false,
"batchCommit": 1000,
"dbType": "graph"
}
}
}

按照此处的说明进行操作:http://www.orientechnologies.com/docs/2.0/orientdb-etl.wiki/Import-from-DBMS.html并从这里安装了 mysql 的 jdbc 驱动程序:http://dev.mysql.com/downloads/connector/j/

并按照描述设置类路径。

运行命令:

./oetl.sh ../import_mysql.json

给出以下输出:

OrientDB etl v.2.0.2 (build @BUILD@) www.orientechnologies.com
Exception in thread "main" com.orientechnologies.orient.core.exception.OConfigurationException: Error on creating ETL processor
at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:278)
at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:188)
at com.orientechnologies.orient.etl.OETLProcessor.main(OETLProcessor.java:163)
Caused by: java.lang.IllegalArgumentException: Transformer 'jdbc' not found
at com.orientechnologies.orient.etl.OETLComponentFactory.getTransformer(OETLComponentFactory.java:141)
at com.orientechnologies.orient.etl.OETLProcessor.parse(OETLProcessor.java:260)
... 2 more

我确实设法使用 CSV 文件创建了一个工作导入,因此我非常确定数据库设置正确。

想法?

最佳答案

{
"config": {
"log": "debug"
},
"extractor": {
"jdbc": {
"driver": "com.mysql.jdbc.Driver",
"url": "jdbc:mysql://localhost/dev_database",
"userName": "root",
"userPassword": "",
"query": "select * from users limit 20"
}
},
"transformers" : [
{ "vertex": { "class": "V"} }
],
"loader": {
"orientdb": {
"dbURL": "plocal:../databases/ETLDemo",
"dbUser": "admin",
"dbPassword": "admin",
"dbAutoCreate": true,
"tx": false,
"batchCommit": 1000,
"dbType": "graph"
}
}
}

你能看看这是否能解决问题吗?

关于mysql - OrientDB 变压器 'jdbc' 未找到,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28886020/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com