cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Best join approaches

rgirishram
New Contributor

What are some of the best join approaches that we need to be aware of? 

3 REPLIES 3

abangard
New Contributor II

Do you mean in SQL terms?

Inner join if you want the intersection from both the tables (commonly used)

Left/Right join if you want to converse data from one table but only get the common ones from other

Full Join, you preserve data from both the tables. All the records that are not common will have Nulls populated.

boomoto
New Contributor II

A couple of things to keep in mind with join, Inner joins can be "dangerous" since they can drop data, so always make sure your using the correct keys. Avoid Right joins when possible. Also think about the relationship of the tabes, 1-1, 1 to many and many to many.

DeanDing
New Contributor II

This fully depends on the table size and business logic, every case are different. For example, you donโ€™t want to do left join when right table is way smaller than left one. 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group