spark value $ is not a member of StringContext
问题描述:
Error:(61, 40) value $ is not a member of StringContext
val click= df.filter($"e_type" === "click")
解决办法
在创建的SparkSession对象后,引入【implicits._】
val spark = SparkSession.builder()
.master("local[*]")
.appName(s"${this.getClass.getName}")
.getOrCreate()
val df = spark.read.json(inputPath)
import spark.implicits._
val click: Dataset[Row] = df.filter($"e_type" === "click")
问题解决,开发继续向下进行