Examples for the beam core Java SDK in Scala.
If you're using a lot of Scala, you should probably look to scio. It's cleaner, clearer and well-adapted to functional programming and scala idioms.
However: byte-code is byte-code. You can use the Java SDK with Scala, and this module demonstrates some of the techniques.
- Explicitly use
java.lang.Boolean
types instead ofscala.Boolean
. - Avoid inlining lambdas. Declare your lambdas in a
val
with the exact type you need. - Seriously, take a look at scio if you're doing more than basic glue code!