Connecting to Cassandra
To connect Data Science & AI Workbench to an Apache Cassandra NoSQL database and access data from its wide column store, you must first import the necessary libraries. Installing the cassandra-driver
package in your project environment enables communication with the Cassandra cluster using its binary protocol and query language.
Install the cassandra-driver
package by running the following command:
When you use conda install
to add a package during a session, the project is impacted temporarily, during the current session only. If you want the change to persist for future project sessions and deployments, be sure to add the package to the project’s anaconda-project.yml
file. For more information, see Project configurations.
After you’ve installed the correct driver, you can then use code such as this to access the cluster from within a notebook session:
See Secrets for information about adding credentials to the platform, to make them available in your projects. Any secrets you add will be available across all sessions and deployments associated with your user account.
Was this page helpful?