title: Hive Query: working with String Array
body: <p>I have a HIVE Table with following schema like this:</p>
  
  <pre><code>hive&gt;desc books;
  gen_id                  int                                         
  author                  array&lt;string&gt;                               
  rating                  double                               
  genres                  array&lt;string&gt;  
  
  hive&gt;select * from books;
  
  | gen_id         | rating    | author          |genres
  +----------------+-------------+---------------+----------
  | 1              | 10        | ["A","B"]       | ["X","Y"]  
  | 2              | 20        | ["C","A"]       | ["Z","X"]
  | 3              | 30        | ["D"]           | ["X"]
  </code></pre>
  
  <p>Is there a query where I can perform some SELECT operation and that returns individual rows, like this:</p>
  
  <pre><code>| gen_id      |  rating        | SplitData
  +-------------+---------------+-------------
  | 1           | 10            | "A"
  | 1           | 10            | "B"
  | 1           | 10            | "X"
  | 1           | 10            | "Y"
  | 2           | 20            | "C"
  | 2           | 20            | "A"
  | 2           | 20            | "Z"
  | 2           | 20            | "X"
  | 3           | 30            | "D"
  | 3           | 30            | "X"
  </code></pre>
  
  <p>Can someone guide me how can get to this result. Thanks in advance for any kind of help.</p>