Spark DataSet - Map

Table of Contents

Example

Dataset<String> names = people.map((Person p) -> p.name, Encoders.STRING));
  • Scala do the cast implicitly.
val names = people.map(_.name)  // in Scala; names is a Dataset[String]

Powered by ComboStrap