May 2017
Intermediate to advanced
294 pages
7h 33m
English
$ spark-shell
scala> val sdf = spark.read.format("libsvm").load("s3a://sparkcookbook/patientdata")
scala> val schema = sdf.schema
scala> val st_df = spark.readStream.schema(schema).format("libsvm").load("s3a://sparkcookbook/patientdata")
scala> val result = st_df.where($"label" === 1.0)
scala> result.writeStream.option("checkpointLocation","cp").format("parquet").start("tested-positive")
Read now
Unlock full access