Ich habe die unten JSON-DateiFunkendatenrahmen java explodieren Funktion
{
"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"
}
}
]
}
Ich möchte eine hive Tabelle auf JSON-Objekte innerhalb „Daten“ JSON-Array basiert. Ich möchte das in Java machen. Ich möchte nicht "data.id, data.fr from temptable" auswählen. Ich möchte etwas tun, das einer Select * -Abfrage ähnlich ist. Es sollte automatisch ein Schema von JSON-Objekten ableiten. Ich kam zu explodieren Funktion in Python und Scala.
http://stackoverflow.com/questions/31859271/sparksql-and-explode-on-dataframe-in-java
Gibt es etwas Ähnliches in Java ??