You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by spark user <sp...@yahoo.com.INVALID> on 2015/07/14 23:52:01 UTC

Data Frame for nested json


is DataFrame  support nested json to dump directely to data base 
For simple json it working fine 
{"id":2,"name":"Gerald","email":"gbarnes1@zimbio.com","city":"Štoky","country":"Czech Republic","ip":"92.158.154.75”}, 
But for nested json it failed to load 
root |-- rows: array (nullable = true) |    |-- element: struct (containsNull = true) |    |    |-- cell: array (nullable = true) |    |    |    |-- element: string (containsNull = true)
2015-07-14 14:50:05[Thread-0] INFO  SparkContext:59 - Invoking stop() from shutdown hookException in thread "main" java.lang.IllegalArgumentException: Don't know how to save StructField(rows,ArrayType(StructType(StructField(cell,ArrayType(StringType,true),true)),true),true) to JDBC at org.apache.spark