Spark - “sbt package” - “value $ is not a member of StringContext” - Missing Scala plugin?

前端 未结 3 2087
情话喂你
情话喂你 2021-02-12 14:16

When running \"sbt package\" from the command line for a small Spark Scala application, I\'m getting the \"value $ is not a member of StringContext\" compilation error on the fo

3条回答
  •  逝去的感伤
    2021-02-12 14:41

    Great answer guys, if resolving import is a concern, then will this work

    import org.apache.spark.sql.{SparkSession, SQLContext}
    val ss = SparkSession.builder().appName("test").getOrCreate()
    val dataDf = ...
    
    import ss.sqlContext.implicits._
    dataDf.filter(not($"column_name1" === "condition"))
    

提交回复
热议问题