In [4]:
# install cassandra driver by
# pip install cassandra-driver
from cassandra.cluster import Cluster
cluster = Cluster(['127.0.0.1'])
session = cluster.connect()
session.execute("use foodmart")
result = session.execute("select * from product where product_id='100'")[0]
print(result.product_class_id, result.brand_name, result.product_name)


110 Golden Golden Grape Popsicles

In [ ]: