Re: SparkSQL DF.explode with Nulls

2015-06-05 Thread Tom Seddon
I figured it out. Needed a block style map and a check for null. The case class is just to name the transformed columns. case class Component(name: String, loadTimeMs: Long) avroFile.filter($lazyComponents.components.isNotNull) .explode($lazyComponents.components) { case

SparkSQL DF.explode with Nulls

2015-06-04 Thread Tom Seddon
Hi, I've worked out how to use explode on my input avro dataset with the following structure root |-- pageViewId: string (nullable = false) |-- components: array (nullable = true) ||-- element: struct (containsNull = false) |||-- name: string (nullable = false) |||--