一、SparkSession
入口
val ss = SparkSession.builder().appName(this.getClass.getName).master("local[*]").getOrCreate()
之后sql语句
ss.sql""""""
切割字段,join两张表报错,
但是
使用下面的入口就不会报错
//conf
val conf = new SparkConf()
.setMaster("local[*]")
.setAppName(this.getClass.getName)
//.set("spark.debug.maxToStringField","100")
//sparkcontext
val sc = new SparkContext(conf)
//sqlcontext
val sQLContext = new SQLContext(sc)