title: Insert Spark Dataset[(String, Map[String, String])] to Cassandra Table
body: <p>I have a Spark Dataset of type Dataset[(String, Map[String, String])].</p>
  
  <p>I have to insert the same into a Cassandra table.</p>
  
  <p>Here, key in the Dataset[(<strong>String</strong>, Map[String, String])] will become my primary key of the row in Cassandra.</p>
  
  <p>The Map in the Dataset[(String, <strong>Map[String, String]</strong>)] will go in the same row in a column <strong>ColumnNameValueMap</strong>.</p>
  
  <p>The Dataset can have millions of rows.</p>
  
  <p>I also want to do it in optimum way (e.g. batch insert Etc.)</p>
  
  <p>My Cassandra table structure is:</p>
  
  <pre><code>CREATE TABLE SampleKeyspace.CassandraTable (
    RowKey text PRIMARY KEY,
    ColumnNameValueMap map&lt;text,text&gt;
  );
  </code></pre>
  
  <p>Please suggest how to do the same.</p>