There is Except in DataFrame API.

df1.except(df2)

Same can be used in SQL as well.

public DataFrame
<https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/DataFrame.html>
except(DataFrame
<https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/DataFrame.html>
other)

Returns a new DataFrame
<https://spark.apache.org/docs/1.6.1/api/java/org/apache/spark/sql/DataFrame.html>
containing
rows in this frame but not in another frame. This is equivalent to EXCEPT in
SQL.


-Hareesh


On 6 July 2017 at 12:22, jeff saremi <jeffsar...@hotmail.com> wrote:

> I tried this query in 1.6 and it failed:
>
> SELECT * FROM Table1 EXCEPT ALL SELECT * FROM Table2
>
>
> Exception in thread "main" java.lang.RuntimeException: [1.32] failure:
> ``('' expected but `all' found
>
>
> thanks
>
> Jeff
>

Reply via email to