title: spark dataframes java explode function
body: <p>I have the below json file</p>
  
  <pre><code>{
     "data": [
        {
           "id": "254094394708288_946242468826807",
           "from": {
              "name": "Emirates NBD  \u0628\u0646\u0643 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062a \u062f\u0628\u064a \u0627\u0644\u0648\u0637\u0646\u064a",
              "category": "Bank/Financial Institution",
              "id": "254094394708288"
           }    
        },
        {
           "id": "254094394708288_945515772232810",
           "from": {
              "name": "Emirates NBD  \u0628\u0646\u0643 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062a \u062f\u0628\u064a \u0627\u0644\u0648\u0637\u0646\u064a",
              "category": "Bank/Financial Institution",
              "id": "254094394708288"
           }        
        }
  ]
  }
  </code></pre>
  
  <p>I want to create a hive table based on JSON objects inside "data" JSON array. I want to do this in Java. I dont want to do "select data.id,data.from from temptable". I want to do something similar to to a select * query. It should automatically infer schema from json objects. I came to find explode function in python and scala. </p>
  
  <pre><code>http://stackoverflow.com/questions/31859271/sparksql-and-explode-on-dataframe-in-java
  </code></pre>
  
  <p>Is there something similar in Java?? </p>