Spark DataSet - Map

Card Puncher Data Processing

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]







Share this page:
Follow us:
Task Runner