title: Insert into table with a MAP data type in Hive
body: <p>I am trying to use a hive streaming job to insert data into a table which contains a column with a MAP data type.  </p>
  
  <p>I have tried setting up all the delimiters in the table definition and then outputting data from the streaming job in the correct format.  </p>
  
  <pre><code>ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
  COLLECTION ITEMS TERMINATED BY ','
  MAP KEYS TERMINATED BY '|'
  LINES TERMINATED BY '\n'
  </code></pre>
  
  <p>I have also tried outputting the data in the exact format that Hive stores maps <code>({key:value})</code>.  </p>
  
  <p>Here is the error I keep seeing:</p>
  
  <pre><code>FAILED: Error in semantic analysis: Line 7:23 Cannot insert into target table because column number/types are different 'table_name': Cannot convert column 2 from string to map&lt;string,string&gt;.
  </code></pre>
  
  <p>Is it possible to do this in Hive?</p>