Skip to content

Instantly share code, notes, and snippets.

View dejanmarich's full-sized avatar

Dejan Marić dejanmarich

  • Zagreb
View GitHub Profile
@dejanmarich
dejanmarich / Example.md
Created October 29, 2019 08:52 — forked from ndrpnt/Example.md
[Spark 1.6] Returns a new DataFrame with nested structures flattened (and arrays exploded (one row for each element))

Before:

root
 |-- a: struct (nullable = true)
 |    |-- b: string (nullable = true)
 |    |-- c: array (nullable = true)
 |    |    |-- element: struct (containsNull = true)
 |    |    |    |-- d: array (nullable = true)
 |    |    |    |    |-- element: string (containsNull = true)
 |    |    |    |-- e: string (nullable = true)