在Apache Spark中加入Group By条件

时间:2016-06-20 04:25:33

标签: database scala apache-spark spark-dataframe

我有两个DataFrames A和B,它们如下所示

    A: [cust_no,feature1,feature2......]
    B: [ID_number,cust_no]

我需要构建一个DataFrame C

    C:[ID_number,feature1,feature2......]
    (where A.cust_no = not any of B.cust_no )**for each ID_number**

如何在Scala中使用Apache Spark DataFrame执行此操作?

PS:我不想提取ID_numbers,然后循环遍历ID_numbers列表,因为Apache-Spark不支持 for loop

的不同迭代之间的并行性

0 个答案:

没有答案