What I'm trying to do is load a CQL file to re-initialize (drop and create) all the tables in a keyspace.
I've search through the documentation at https://datastax.github.io/python-driver/ but didn't find any immediate way of accomplishing this.
SOURCE doesn't work since it's a cqlsh command. I've tried reading the file in as input and running that, but encounter errors because execute() only runs a single line. My last option would be to parse the file and run each CQL command, but that's a lot of hassle for a simple request.
Currently, the closest I've gotten is executing the file during a read, as shown below. This is where I get issues with EOL due to the semi-colons.
with app.open_resource('schema.cql', mode='r') as f:
db.execute(f.read())