How does one go about uploading a database like Apache Cassandra after creating one? Furthermore, is there a way to upload/share only its skeleton structure, without the data gathered in it? I'm on MacOS and would like to use Python to do all of this. Thank you!
-
What do you mean by uploading? You can get the complete schema output using "DESCRIBE SCHEMEA" command in cqlsh. You can use datastax driver for python to connect to Cassandra database and execute your queries. – Manish Khandelwal Jun 26 '21 at 06:53
-
Does upload mean to load the other cassandra's complet schema in the new one? Maybe this question helps you: https://stackoverflow.com/questions/67639544/how-do-i-replicate-a-cassandras-local-node-for-other-cassandras-remote-node . – Luciana Oliveira Jun 29 '21 at 17:31
-
By upload I guess I mean share the database with someone else, or have the Apache Cassandra database be accessible and editable on more than one device. How can I upload or I guess port that to someone else's device? – Karim Abou Najm Jun 30 '21 at 04:32
1 Answers
Based on your second comment, I guessed it to mean you want the database to be remotely accessible to clients/apps not installed locally.
Clients/apps connect to Cassandra on the IP address set for rpc_address
and the CQL port set for native_transport_port
(default is 9042
) set in cassandra.yaml
.
You mentioned that your Cassandra instance is running on your laptop so only clients/apps running on your local network can access it if you configure rpc_address
to an IP address accessible on the network (default is localhost
).
If you're just trying out Cassandra and want to collaborate with other developer friends, try Astra and launch Cassandra instance on the free-tier (no credit card required). With it you can share the database credentials with your friends and they can connect to it over the internet.
You can connect to Astra from your Python app using the Python driver. Otherwise, Astra includes Stargate.io pre-configured and ready to use. Stargate is a data access gateway that lets you connect to Cassandra from your app using REST API, GraphQL API or JSON/Doc API without having to learn CQL. For more info, see Connecting to your Astra database. Cheers!

- 13,964
- 1
- 18
- 23