did you try this -
DataFrame joinedDf_intersect =
leftDf.select("x", "y", "z")
.join(rightDf,leftDf.col("x").equalTo(rightDf.col("x"))
.and(leftDf.col("y").equalTo(rightDf.col("y"))), "left_outer") ;
Hope that helps.
On Mon, Feb 22, 2016 at 12:22 PM, praneshvyas [via Apache Spark User List] <
ml-node+s1001560n26293...@n3.nabble.com> wrote:
> Hi Spark Users,
>
> I am using spark 1.5+.
>
> I am trying to do left/right outer join on multiple columns. But looks
> like there is no way to do that.
>
> I can do a inner join on multiple columns, but not left/right outer join.
>
> THIS WORKS:
> val joinedDf_intersect = leftDf.join(rightDf, Seq("device_id",
> "normalized_subscriber_id"))
>
> THIS DOESN'T WORK
> val joinedDf = leftDf.join(rightDf, Seq("device_id",
> "normalized_subscriber_id"), left_outer)
>
>
> Please let me know if there is a way to do.
>
> Thanks in advance
>
> ------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-spark-user-list.1001560.n3.nabble.com/Left-Right-Outer-join-on-multiple-Columns-tp26293.html
> To unsubscribe from Apache Spark User List, click here
> <http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=1=c21hcnRzaG9iaHVAZ21haWwuY29tfDF8MzU4MDIyNzAx>
> .
> NAML
> <http://apache-spark-user-list.1001560.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
*Regards , Shobhit Gupta.*
*"If you salute your job, you have to salute nobody. But if you pollute
your job, you have to salute everybody..!!"*
--
View this message in context:
http://apache-spark-user-list.1001560.n3.nabble.com/Left-Right-Outer-join-on-multiple-Columns-tp26293p26295.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.