Spark 2.2结构化流-静态左外部联接问题

时间:2019-03-05 19:50:37

标签: spark-structured-streaming

我似乎在流上缺少某些内容-Spark 2.2中的静态联接。

该手册指出可以进行这样的连接,但是我无法获得正确的语法。奇。没有使用水印。

val joinedDs = salesDs
  .join(customerDs, "customerId", joinType="leftOuter")

得到的错误如下,但我很确定自己有正确的一面:

<console>:81: error: overloaded method value join with alternatives:
  (right: org.apache.spark.sql.Dataset[_],joinExprs: 
org.apache.spark.sql.Column,joinType: String)org.apache.spark.sql.DataFrame <and>
  (right: org.apache.spark.sql.Dataset[_],usingColumns: Seq[String],joinType: String)org.apache.spark.sql.DataFrame
 cannot be applied to (org.apache.spark.sql.Dataset[Customer], String, joinType: String)
         .join(customerDs, "customerId", joinType="left_Outer")
          ^

1 个答案:

答案 0 :(得分:0)

出于某种原因,在添加joinType时,我还需要添加Seq。

  .join(customerDs, Seq("customerId"), "left_Outer")
相关问题