Hope everyone doing great..!!
Recently in one of my project, i got a chance to connect tableau with Cassandra which is a NoSQL database. I heard many times about NoSQL databases so i was excited to work with it.
lets discuss how to connect tableau with cassandra and some of the fact when we join cassandra key-spaces( Yes..!! join cassandra key-spaces)
Let me first give you a brief about cassandra, Cassandra is a distributed database from Apache that is highly scale-able and designed to manage very large amounts of structured data. It provides high availability with no single point of failure.
Basic difference between SQL and NoSQL.
Steps to connect Tableau with Cassandra.
Step 1:- As there is no direct connectivity option to connect to Cassandra is available in Tableau Data Source connection page, so the only option is to connect via ODBC driver, there are many drivers available like DataStax, Simba etc
So first we need to download the Cassandra ODBC driver (Click here) and install the .msi file which is downloaded
and once done, click finish.
Step 2:- Open ODBC Administrator of your system, and go to SYSTEM DSN, you will find Datastax Cassandra ODBC DSN
Double click to configure,
For configuration, you need to have
- Host:- Host name where Cassandra is installed
- Port:- Port at which Cassandra is running
- User Name & Password:- Default(u-cassandra, p-cassandra for version above 3.0)
Once done, Click test, It will give you success message. Hurreyyyyy Configuration is done.
Processing query and Wooooooooooooo… It’s done.
Now all you need to do is Select keyspace, schema and Table and start Visualizing.
Joining Cassandra's key-spaces.
Yes, joining cassandra keyspaces, i guess many of developers who are working with cassandra might have one question in their mind. that how is this possible, joining is not possible in NoSQL databases(click here for reference)
but yes using ODBC drivers we can join NoSQL databases as well...but how it happen??
Particularly while connecting Cassandra with Tableau joins are possible, let me show you first how it looks like when we connect tableau with cassandra and drag 2 tables to join(the same way we join two RDBMS tables/sheets)
but then one important question arises, that if NoSQL doesn't support join then how these joins are happening, because in normally what happen in Tableau when we apply joins VizQL generated one query and that query is being passed to data source and compute the output and send it back to Tableau. but if it is happening the same way then in NoSQL it will not work..
So the answer is, Joins are happening at the ODBC level. Yes at ODBC level, based on the query generated by query, ODBC takes the data from the tables used in that query and perform joins at its own level, thats why joining Nosql Tables in tableau are possible..
Thanks for reading this, I hope this is useful to you.
Love to hear feedback, query if any.