Scalding offers another type-safe API. The type-safe API is not named. Data streams through the typed pipe as tuples, and reference to data is achieved through the notation tuple._1
or by using the case
classes, as shown in the following code:
case class Animal(name : String, kind: String) val animals : TypedPipe[Animal] = getAnimals val birds = animals.filter { _.kind == "bird" }
Operations that exist in both APIs and pipes interoperate. We can convert from Fields
to Typed
and the other way round. Using any one of the APIs is a matter of preference and code readability.