Skip to content

Instantly share code, notes, and snippets.

@nicosuave
nicosuave / Schema2CaseClass.scala
Created Oct 5, 2017 — forked from yoyama/Schema2CaseClass.scala
Generate case class from spark DataFrame/Dataset schema.
View Schema2CaseClass.scala
/**
* Generate Case class from DataFrame.schema
*
* val df:DataFrame = ...
*
* val s2cc = new Schema2CaseClass
* import s2cc.implicit._
*
* println(s2cc.schemaToCaseClass(df.schema, "MyClass"))
*
@nicosuave
nicosuave / 0_reuse_code.js
Created May 19, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console