Voglio convertire la variabile di stringa in basso in dataframe su spark.come convertire la stringa json in dataframe sulla scintilla
val jsonStr = "{ "metadata": { "key": 84896, "value": 54 }}"
so come creare dataframe da file JSON.
sqlContext.read.json("file.json")
ma non so come creare dataframe da variabile stringa.
Come posso convertire la variabile json String in dataframe.
Non aggiornato, vedere sotto la risposta per Spark 2.2 –