How To Insert Map Type Into Cassandra Using Cassandra-driver For Python
Since, cassandra supports map type. I want to insert a python dict into cassandra. I tried this: cql = 'Insert into table_name (my_key, name, my_dict) values (%s, %s, %s)' % (my_ke
Solution 1:
Use parameter passing form instead of string interpolation:
cql = "Insert into table_name (my_key, name, my_dict) values (%s, %s, %s)"
session.execute(cql, (my_key, name, my_dict))
Post a Comment for "How To Insert Map Type Into Cassandra Using Cassandra-driver For Python"