Fast and furiously safe: type safe programming with Spark DataFrames
summary
doric is an open-source Scala DSL that makes Spark DataFrame column expressions type-safe at compile time, turning missing-column and wrong-type runtime failures into two explicit checks that can prevent DataFrame creation. It implements a thin layer over Spark, uses cats Validated error accumulation to report all errors in one run, and uses the sourcecode library to attach source locations to bad column definitions. Tested against Spark 3.1, current release 0.0.2, it preserves DataFrame performance while requiring minimal syntax changes.
AI-written summary · about
chapters (23)
- 0:00Intro
- 1:03Spark DataFrame vs datasets
- 1:47Possible "errors" working in spark
- 3:59Column party
- 5:04Let's crank it up
- 5:54Benefits? Compile time errors
- 7:26What we need to check the type of a column?
- 8:15Type check verification benefits
- 9:51Spark is fail fast
- 11:35Validate benefits
- 12:27Not only for a single operation
- 14:23Fast location of error source
- 16:56Modularization FTW!!!
- 19:19Doric vs other flavors
- 21:11Doric highlights
- 22:05Doric is super easy to use
- 23:44Use directly in your previous spark code
- 24:23Doric splits castings in two types of castings
- 27:51Doric syntax sugar level
- 28:06Easy to work with types
- 29:01Spark string interpolators
- 29:56Doric current state
- 30:46Doric near future work
