org.terminal21.sparklib.calculations.SparkCalculation
See theSparkCalculation companion object
case class SparkCalculation[OUT](key: String, dataUi: UiElement & HasStyle, toUi: OUT => UiElement & HasStyle, cached: Cached[OUT], dataStore: TypedMap)(implicit evidence$1: ReadWriter[OUT], spark: SparkSession, session: ConnectedSession, events: Events) extends UiComponent
A UI component that takes a spark calculation (i.e. a spark query) that results in a Dataset. It caches the results by storing them as parquet into the tmp folder/spark-calculations/$name. Next time the calculation runs it reads the cache if available. A button should allow the user to clear the cache and rerun the spark calculations in case the data changed.
Because the cache is stored in the disk, it is available even if the jvm running the code restarts. This allows the user to run and rerun their code without having to rerun the spark calculation.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait UiComponentclass UiElementtrait AnyElementclass Objecttrait Matchableclass Any
Members list
In this article