What are the Jar files required to connect from Wso2DSS to CassandraDB - cassandra

I am connecting from Wso2DSS to CassandraDB, i added the (apache-cassandra-cql-1.0.3,cassandra-all-0.8.0-beta2) jar files, still I am getting the following error.
java.sql.SQLException: org.apache.cassandra.cql.jdbc.CassandraDriver.
How can I solve this error?

If you are using the latest versions of DSS (> v.3.0.0), the Cassandra JDBC driver which is used to connect to Cassandra via JDBC, is by default shipped with DSS. Therefore, it's just a matter of configuring your data source in DSS (as a carbon datasource or an inline datasource in the data service descriptor file) with the driverClassName "org.apache.cassandra.cql.jdbc.CassandraDriver" and other relevant parameters like JDBC URL, username, password, etc, and pointing to it within the data service descriptor. (.dbs file)
However, if you're using any other WSO2 product such as ESB or an older version of DSS, then you will have to download the cassandra JDBC driver and the other dependency jars (if any) to CARBON_HOME/repository/components/lib, restart the server and then configure your datasources pointing to Cassandra.
Hope this helps.
Regards,
Prabath

Related

Pyspark: How to setup multiple JDBC connections?

Usecase: I have two databases, one for prod and one for dev. The prod uses an SAP JDBC driver, and the dev uses an Oracle JDBC driver as they are based on different DB's. I have to fetch data from prod DB, perform few operations and save it in dev DB for few project needs.
Issue: Currently am using these third-party drivers by setting "spark.driver.extraClassPath" in Spark Context. But this takes in only one argument. Thus, I am able to connect to only one of the DB's at a time.
Is there are any way I can make two different JDBC class path configuration? If not, then how can I approach this issue? Any guidance is much appreciated!!
Solution:
Instead of defining the driver file path, providing the folder path loads all drivers in that folder. So, in my case, I placed both the SAP and Oracle JDBC drivers in same folder and mentioned it in the Spark Context Configuration like shown in the below snippet.
.set("spark.driver.extraClassPath", r"<folder_path_jdbc_drivers>\*")

How do I configure Talend Open Studio to connect to a Cassandra cluster?

I referred this Documentation
https://www.javatpoint.com/talend-jdbc-connection
For how to config DB connection on Talend. In the documentation mentioned, MySQL JDBC Connector is used to connect the MySQL DB to Talend. In my case, I need to connect with Cassandra JDBC Connector is used to connect the Cassandra DB to Talend, and the connection is also established successfully.
The documentation mentioned when we right-click on the database connection it will show the popup menu. The pop-menu shows the retrieve schema option. This option is used to show the table. But when I right-click on the DB connection it's not showing a pop-menu on the Talend Open Studio. How to fix this issue.
I suspect the problem is that you're using the wrong JDBC driver although I'm unable to confirm that since you didn't actually say which one you're using.
You will need to download the Simba JDBC Driver for Apache Cassandra from DataStax Downloads in order to connect to a Cassandra cluster. Then you'll need to install the driver on to your Talend.
I don't have the detailed steps for doing that but I've previously written instructions for connecting clients like Pentaho Data Integration and DBeaver to Astra DB which is a Cassandra-as-a-service. The instructions for those should give you an idea of how to configure Talend. Cheers!
I encountered the same problem, you're supposed to make the connection under the 'NoSQL Connections' Tab since Cassandra is a NoSQL database.
I followed the instructions here

Data not retrieved after switching JanusGraph storage backend from Thrift to CQL

I am working on upgrading Cassandra version for my application from 2.1.9 to 3.11.13. We also use JanusGraph 0.3.2 which was using "thrift" as a storage backend. As part of the Cassandra upgrade to 3.11, I have also switched the storage backed to "cql" and update my Java application to use janusgraph-cql driver.
After upgrading Cassandra and restoring existing data (including SSTable Upgrade), the application came up properly but I do not see any data from the JanusGraph which was created using thrift storage backend. I have verified the data is not lost by using gremlin and querying the old vertices by its names.
Edit: I have tried creating new vertices and that works. Only issue is that I am not able to query old data from my Java application using janusgraph-cql drivers.
What could possibly be the reason for not retrieving the data previously created with Thrift storage backend?
Any pointers will be appreciated.

Log all query in cassandra 3.4.4

I'm looking to log all logs in Cassandra 3.4.4 (for instance, to log if query was ok, bad, but also connection timed out or bad credentials). Thanks
Unfortunately Cassandra 3 doesn’t have a feature for that. However, there is an open source 3rd party plugin that does this.
Check out Ericsson’s Cassandra Query Logger:
https://github.com/Ericsson/ecaudit/
Basically, you download the JAR, add it to lib/, reference it in the Cassandra-env.sh, and that should do it.

Connect PowerBI Desktop with Apache Spark local machine installation

Can someone guide me how to connect PBI Desktop to APACHE SPARK installed on a local windows machine? What should be the server details I should pass?
I have read thrift connections are very slow so would want to avoid them unless they are the only choice.
Edit -
Based on the suggestion, I tried to set up thrift connection following the below link - medium.com/#waqasrafiq327/… . Mine is a windows installation. Given paths seems to be for linux? I cant see a hive-site.xml file under /spark/conf folder. I also dont see a /apachehive/conf folder in my spark installtion. My spark installation is the latest version of spark release available. Please guide.
You have to use the thrift server as it is required if you want to connect via ODBC or JDBC. This is the only way to connect from Power BI to Apache Spark.

Resources