0

I'm trying without success use a cassandra database with mondrian, there's some way to make it work? or it's just impossible cause mondrian only works with relational database? my code works with 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 );

I was trying to do this way, and always getting this error

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

some super cool guy/girl could help me?

1 Answers1

0

Mondrian is not compatible with Cassandra.

Check Mondrian Database compatibility list

Use Datastax Java Driver :

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

Example :

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

Also there is a Cassandra JDBC Driver
http://www.dbschema.com/cassandra-jdbc-driver.html

Ashraful Islam
  • 12,470
  • 3
  • 32
  • 53