You can access Cassandra to display data using a Jaggery function. Within that function you can query the database and retrieve the required data The steps below demonstrates an example on accessing Cassandra using Jaggery.
- Download cassandra-jdbc-1.1.1.wso2v1.jar file and place it in
Add below datasource to
<BAM_HOME>/repository/conf/datasources/master-datasources.xmlfile ad edit the configurations as required.
The JDBC Cassandra driver used in the above configuration allows you to connect to one Cassandra node. Thereby, it does not support configuring multiple connections to several nodes in a Cassandra cluster.
Add the below code snippet as a Jaggery file in
repository/deployment/server/jaggeryapps/directory, to access and query the Cassandra datasource.
In the above code snippet,
Cassandra_Queryis the name of the datasource, which you created above, and
org_wso2_ticket_serviceis the name of the column family.