So you need to place cassandra connector libs within {JAGGERY_HOME}/carbon/repository/components/lib/ directory or use Cassandra feature enabled carbon product.
I'm going to use enterprise-store[1] from the branch social to develop this sample script.
Create jaggery file select.jag inside your jaggery app.
and put the following script inside select.jag,
<%This[2] might help to publish data into Cassandra within jaggery.
var db = new Database("jdbc:cassandra://localhost:9160/EVENT_KS","admin","admin",{"driverClassName":"org.apache.cassandra.cql.jdbc.CassandraDriver"});var result;
db.query("USE EVENT_KS");result = db.query("SELECT * FROM org_wso2_bam_phone_retail_store_kpi");
print(result);
%>
[1] https://github.com/wso2/enterprise-store
[2] http://udarakr.blogspot.com/2013/09/publish-data-to-cassandra-from.html
No comments:
Post a Comment