Saiku 连接 mongodb

type=OLAP
name=optiqmongo
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:optiq:model=../webapps/saiku/optiqmongo/mongo-foodmart-model.json;Catalog=../webapps/saiku/optiqmongo/FoodMart.xml;JdbcDrivers=net.hydromatic.optiq.jdbc.Driver;

#+BEGIN_SRC

sudo apt-get install mongodb

$ curl -o /tmp/zips.json http://media.mongodb.org/zips.json $ mongoimport --db test --collection zips --file /tmp/zips.json Tue Jun 4 16:24:14.190 check 9 29470 Tue Jun 4 16:24:14.469 imported 29470 objects

Log into MongoDB to check it's there:

$ mongo MongoDB shell version: 2.4.3 connecting to: test

> db.zips.find().limit(3)

{ "city" : "ACMAR", "loc" : [ -86.51557, 33.584132 ], "pop" : 6055, "state" : "AL", "_id" : "35004" } { "city" : "ADAMSVILLE", "loc" : [ -86.959727, 33.588437 ], "pop" : 10616, "state" : "AL", "_id" : "35005" } { "city" : "ADGER", "loc" : [ -87.167455, 33.434277 ], "pop" : 3205, "state" : "AL", "_id" : "35006" } > exit bye

#+END_SRC

Comments

comments powered by Disqus