【问题标题】:polygot persistence gremlin queries help neededpolygot 持久性 gremlin 查询需要帮助
【发布时间】:2013-09-30 19:48:35
【问题描述】:

我尝试使用gremlin polygot 查询将表从oracle 导出到neo4j。但没有成功。我为此使用TinkerGraph

以下代码在 Eclipse IDE 中运行良好。但无法在 gremlin-groovy-2.4.0 REPL 中运行。

import oracle.jdbc.pool.OracleDataSource
import groovy.sql.*

OracleDataSource ds = new OracleDataSource()
ds.user = 'scott'
ds.password = 'tiger'
ds.driverType = 'thin'
ds.serverName = 'localhost'
ds.portNumber = 1521
ds.databaseName = 'test' 

Sql sql = new Sql(ds)

sql.eachRow('select * from survey4') { row -> println row.name }

sql.close()

【问题讨论】:

  • 我看到你在下面回复了自己....现在这对你有用吗?
  • 实际上只在连接oracle时获得了成功。但是节点和顶点的创建仍在等待中。

标签: eclipse oracle neo4j gremlin


【解决方案1】:

我最终在 gremlin-groovy REPL 中得到了这一行解决方案:

import oracle.jdbc.pool.OracleDataSource
import groovy.sql.*
OracleDataSource ds = new OracleDataSource();ds.user = 'scott';ds.password = 'tiger';ds.driverType = 'thin';ds.serverName = 'localhost';ds.portNumber = 1521;ds.databaseName = 'test';Sql sql = new Sql(ds);sql.eachRow('select * from survey4') { row -> println row.name };sql.close()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-04-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多