Hi, Trying to run Datastax Examples on Github for python in VM, unable to connect to Cassandra database. Queries are not returning any error but i think there is a connection issue. Can you please help here.
Below are the connection details which I was using in my VM
def create_connection(): # cluster details from nodetool status cluster = Cluster(['127.0.0.1:9042']) return cluster.connect('demo')
After execution of this, when trying to insert new user into the table
def set_user(session, lastname, age, city, email, firstname): session.execute("INSERT INTO demo.users (lastname, age, city, email, firstname) VALUES (%s,%s,%s,%s,%s)", ['Yan', 20, 'London', 'Yan@gmail.com', 'Vani'])
Not getting any execution error but table was not updated, which shows connection issue.
Do I need to import any libraries here?