蒙德里安与卡桑德拉

时间:2017-06-07 20:06:13

标签: jdbc cassandra olap mondrian rolap

我尝试没有成功使用mondrian的cassandra数据库,有什么方法可以使它工作?或者它只是不可能因为mondrian只适用于关系数据库?我的代码适用于mysql

Connection connection = new Connection();
        connection.setCatalogPath( getClass().getResource( "/mySchema.xml" ).getPath() );
        connection.setDriver( "com.datastax.driver.core.Cluster" );
        connection.setUrl( "127.0.0.1:9160/myKeySpace" );
        connection.setPassword( "cassandra" );
        connection.setUser( "cassandra" );
        rolapConnection = (RolapConnection) DriverManager.getConnection( connection.getProperties(), null );

我试图这样做,并且总是收到此错误

mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while creating SQL connection: Jdbc=jdbc:cassandra://127.0.0.1:9160/myKeySpace; JdbcUser=cassandra; JdbcPassword=cassandra

No suitable driver found for jdbc:cassandra://127.0.0.1:9160/myKeySpace

一些超级帅哥/女孩可以帮帮我吗?

2 个答案:

答案 0 :(得分:0)

蒙德里安与卡桑德拉不兼容。

检查Mondrian Database compatibility list

使用Datastax Java Driver:

<dependency>
  <groupId>com.datastax.cassandra</groupId>
  <artifactId>cassandra-driver-core</artifactId>
  <version>3.2.0</version>
</dependency>

示例:

Cluster cluster = null;
try {
    cluster = Cluster.builder()                                                    // (1)
            .addContactPoint("127.0.0.1")
            .build();
    Session session = cluster.connect();                                           // (2)

    ResultSet rs = session.execute("select release_version from system.local");    // (3)
    Row row = rs.one();
    System.out.println(row.getString("release_version"));                          // (4)
} finally {
    if (cluster != null) cluster.close();                                          // (5)
}

Read More

还有一个Cassandra JDBC驱动程序
http://www.dbschema.com/cassandra-jdbc-driver.html

答案 1 :(得分:0)

您可以从Progress DataDirect查看此DataStax JDBC驱动程序:https://www.progress.com/jdbc/datastax-enterprise