title: How to use insert asynchronously into Cassandra with Spring Data?
body: <p>In the older version of Spring Data Cassandra, batching was achieved as below:</p>
  
  <pre><code>String cqlIngest = "insert into person (id, name, age) values (?, ?, ?)";
  
  List&lt;Object&gt; person1 = new ArrayList&lt;Object&gt;();
  person1.add("10000");
  person1.add("David");
  person1.add(40);
  
  List&lt;Object&gt; person2 = new ArrayList&lt;Object&gt;();
  person2.add("10001");
  person2.add("Roger");
  person2.add(65);
  
  List&lt;List&lt;?&gt;&gt; people = new ArrayList&lt;List&lt;?&gt;&gt;();
  people.add(person1);
  people.add(person2);
  
  cassandraOperations.ingest(cqlIngest, people);
  </code></pre>
  
  <p>And in latest version document; <a href="https://docs.spring.io/spring-data/cassandra/docs/current/reference/html/#repositories.query-methods" rel="nofollow noreferrer">https://docs.spring.io/spring-data/cassandra/docs/current/reference/html/#repositories.query-methods</a>
  batchOps is introduced on the CQLTemplate which gets CassandraBatchOperations. But this class seems to be entity aware as below</p>
  
  <pre><code>template.batchOps().insert(new User()).execute();
  </code></pre>
  
  <p>Is there a way to pass in cqlIngest and people like in older version of code sample given on top?</p>
  
  <p>I'm using Spring 2.0.7.RELEASE with Cassandra driver 3.5.0.</p>