title: Batch queries into Cassandra
body: <p>I'm Trying to insert a batch of objects into Cassandra something like this:</p>
  
  <pre><code>public void insertIntoCassandra(ArrayList&lt;FileLoaderVo&gt; LoadVo)
          throws NitroLoaderException {
  
      int temp = LoadVo.size();
  
      try {
          Session session = cassandraDAO.getSession();
          if (session == null) {
              String msg = "CassandraDAO.getSession() returned null";
              logger.error(msg);
              throw new FileLoaderException(msg);
          }
  
          BoundStatement bStmtHistTable = null;
  
          if (pStmtHistTable == null) {
              pStmtHistTable = session.prepare(insertToCassandra);
              pStmtHistTable.setConsistencyLevel(ConsistencyLevel.ONE);
          }
  
          for (FileLoaderVo fileLoaderVo : LoadVo) {              
  
              bStmtHistTable = pStmtHistTable.bind(fileLoaderVo.getSecurityCode(),
                      fileLoaderVo.getType(), fileLoaderVo.getAreaCode(),
                      fileLoaderVo.getEmpName(), fileLoaderVo.getCityType(),
                      fileLoaderVo.getHomeFIPS(), fileLoaderVo.getLastName(),
                      fileLoaderVo.getDst(), fileLoaderVo.getCssCode(),
                      fileLoaderVo.getAbbr(), fileLoaderVo.getOfficeFIPS(),
                      fileLoaderVo.getMiddleName(), fileLoaderVo.getZone(),
                      fileLoaderVo.getUtc());
  
              session.execute(bStmtHistTable);
              logger.info("LoadVo.size() is :"+temp);
              temp--;
          }
      } catch (Exception e) {
          System.out.println(e);
      }
  
  }
  </code></pre>
  
  <p>Here I'm passing this method an ArrayList of objects to be inserted into Cassandra., 
  But Is there any way I could run a single query on these objects like a batch insert ?</p>
  
  <p>I've looked into datastax but couldn't find anything, your inputs would be appreciated.</p>
  
  <p>Thanks in advance. </p>