你好@Gaurav Rupnar
下麵的代碼片段複製我的聲明。
查看查詢計劃的變化,當你評論res dataframe緩存()
spark.conf.set (“spark.sql.shuffle。分區",2000)spark.conf.set (“spark.sql。autoBroadcastJoinThreshold”, 1) val factData = Seq (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) .toDF(“價值”)val dimData = Seq (1、2、3) .toDF val res = factData(“價值”)。加入(dimData Seq(“價值”))res.cache () res.write.format .mode(“等待”)(“追加”).save () res.unpersist ()