title: How to cast a string to array of struct in HiveQL
body: <p>I have a hive table with the column "periode", the type of the column is string.</p>
  
  <p>The column have values like the following:</p>
  
  <pre><code>[{periode:20160118-20160205,nb:1},{periode:20161130-20161130,nb:1},{periode:20161130-20161221,nb:1}]
  [{periode:20161212-20161217,nb:0}]
  </code></pre>
  
  <p>I want to cast this column in <code>array&lt;struct&lt;periode:string, nb:int&gt;&gt;</code>.
  The final goal is to have one raw by periode.
  For this I want to use lateral view with explode on the column periode.
  That's why I want to convert it to <code>array&lt;struct&lt;string, int&gt;&gt;</code></p>
  
  <p>Thanks for help.
  Sidi</p>