如何将输出字数连接到Power BI仪表板? 这是我的Spark Streaming代码:
val ssc = new StreamingContext(sc, Seconds(10))
val lines = ssc.textFileStream("/tmp/sanal/dcsStreaming/")
val words = lines.flatMap(_.split(" "))
val pairs = words.map((_, 1))
val wordCounts = pairs.reduceByKey(_ + _)
Wordcounts.print()
ssc.start()