python-3.xcassandracassandra-3.0cassandra-python-driverdatastax-python-driver

Write data to cassandra using python parser


I have a user defined python library which parses the data from a file and returns key value pairs. Now how do I use this library to insert data into Cassandra column family? I’m using python Cassandra driver.


Solution

  • Have you looked at the Datastax Driver Documentation?

    Most specifically:

    Generate a PreparedStatement for the insertion query and iterate over a list/tuple/generator with the key value pairs from your parsed file data.