Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block dharadhruve

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dharadhruve /
Last active Jul 18, 2019 — forked from ebuildy/
Flatten Spark data frame fields structure, via SQL in Java. This fork also supports ArrayType fields.
class Toto
public void Main()
final DataFrame source = GetDataFrame();
final String querySelectSQL = flattenSchema(source.schema(), null);
final DataFrame flattenData = sqlContext.sql("SELECT " + querySelectSQL + " FROM source")
You can’t perform that action at this time.