How to use outer apply in Spark sql

Viewed 1355

I am new to spark sql. I am in a situation to convert existing sql query to spark sql. My existing sql query contains outer apply function which needs to work in spark sql. What is the alternative for Outer apply in Spark sql?

Any help much appreciated.

Thanks in advance.

2 Answers

You can do a OUTER APPLY with LEFT JOIN LATERAL ( query ).

Here a link to the official documentation including examples at the bottom: JOIN (Databricks SQL)

OUTER APPLY is just a LEFT OUTER JOIN

Related