I'm struggling (Spark / Scala newbie) to achieve the following conversion that slpits the json into columns.
e.g. From C* table
===================================
| id | jsonData |
===================================
| 1 | {"a": "123", "b": "xyz" } |
+----+----------------------------+
| 2 | {"a": "3", "b": "bar" } |
-----------------------------------
to Spark DataFrame:
==================
| id | a | b |
==================
| 1 | 123 | xyz |
+----+-----+-----+
| 2 | 3 | bar |
------------------
I'm using Spark 1.6 and Scala 2.10.
Update: I don't know the key names (or many) of JSON.