DZone
Integration Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Integration Zone > Introducing Anypoint Connector for Cassandra

Introducing Anypoint Connector for Cassandra

Cassandra is used by many organizations to handle large amounts of data. Learn to integrate Apache Cassandra with the Cassandra Connector.

Nathan Nam user avatar by
Nathan Nam
·
Jun. 01, 17 · Integration Zone · Tutorial
Like (2)
Save
Tweet
3.36K Views

Join the DZone community and get the full member experience.

Join For Free

Apache is an open-source NoSQL database management system designed to handle large amounts of data across commodity hardware. Cassandra was initially developed at Facebook to power the Facebook inbox search feature, and became an Apache project in 2009. Since then, it has been adopted by more than 1,500 companies including Walmart, Netflix, Sony, Macy’s and UBS.

There are many ways customers use Cassandra within their organizations: to replace Oracle DB/SAN Storage with Cassandra, for front-end caching their e-commerce platform, or for storing historical financial data from a range of different sources. For those customers and others interested in exploring Cassandra, we are thrilled to announce the release of Anypoint for Cassandra.

In this blog, I’d like to walk you through a simple demo app to show how to use the Cassandra Connector. Before you start with the demo app, please make sure you have the Cassandra Connector v2.0.0 downloaded from the Exchange.

Image title

After you install the Cassandra Connector and import the demo app into Studio, you will see the following flows.

Image title

Let us configure the Cassandra Connector first. If you go to Global Elements, you will find “CassandraDB.” After selecting “CassandraDB,” please click on “Edit.”

Image title

In the CassandraDB: Configuration, you can specify the configuration of your Cassandra server. You can directly add your Cassandra information in the configuration, but I recommend you use the properties file to add your configuration information.

mule-app.properties include the following keys-value pairs:

  • username=
  • password=
  • host=
  • keyspace=demo (In this demo, I will use a “demo” key space.)
  • port=

After you complete the configuration for your Cassandra environment, let us run this app. When you open up a browser and hit localhost:8081, your browser will show the following page.

Image title

I will create a “demo” table with three columns: id, name, and event. As you can see below, id is set as a Partition Key (Primary Key) in the Mule table.

Image title

Before we start to add items to a “demo” table, I should mention that one of the key features the connector offers is showing you the metadata. If you go to the “Insert” flow in Studio, you can see the demo table has id, name, and event as columns.

Image title

Let us add a couple of items with the “Insert into DEMO table.”

Image title

After you added items, you can execute a CQL statement to retrieve items from the table. The connector supports “Execute a CQL statement,” but also provides easier ways to execute the CRUD operations with following operations: Select, Insert, Update, and Delete.

Image title

Let us retrieve items from the demo table.

Image title

For new users, try the above example to get started, and for others, please share with us how you are planning to use the Cassandra Connector!

Connector (mathematics)

Published at DZone with permission of , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Use Cluster Mesh for Multi-Region Kubernetes Pod Communication
  • Privacy and the 7 Laws of Identity
  • Slowness in Java Application Due To Increased FullGC Events: G1GC
  • Build a Seamless GitOps Pipeline with Flux

Comments

Integration Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo