【发布时间】:2016-02-18 04:13:44
【问题描述】:
我正在使用 Spark 1.3,并希望使用 python 接口 (SparkSQL) 加入多个列
以下作品:
我首先将它们注册为临时表。
numeric.registerTempTable("numeric")
Ref.registerTempTable("Ref")
test = numeric.join(Ref, numeric.ID == Ref.ID, joinType='inner')
我现在想根据多个列加入它们。
我收到 SyntaxError: invalid syntax with this:
test = numeric.join(Ref,
numeric.ID == Ref.ID AND numeric.TYPE == Ref.TYPE AND
numeric.STATUS == Ref.STATUS , joinType='inner')
【问题讨论】:
标签: python apache-spark join pyspark apache-spark-sql