---
schema_version: "1"
id: a352ae8a3fbb18ee29799f081873a92502a942027630291972b409f7769c300b
title: Left Join
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_data_prep_recipe_transformation_leftjoin.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_data_prep_recipe_transformation_leftjoin.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e90acfa24c9e952fde0782c3e4d58d75eacfa91345c8472e6da339bcf0a87cbf
description: Like a lookup, a left join in CRM Analytics includes all rows from the left (recipe data) and only matching rows from the right. Unlike a lookup, a join includes all matched rows in the target when multiple rows match.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Left Join

Like a lookup, a left join in CRM Analytics includes all rows from the left (recipe data) and only matching rows from the right. Unlike a lookup, a join includes all matched rows in the target when multiple rows match.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in Salesforce Classic and Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with CRM Analytics, which is available for an extra cost in <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions. Also available in <strong>Developer</strong> Edition.</td></tr></tbody></table>

Example

Our company's marketing team captures demographic data in an external data source for opportunities stored in Salesforce. To help create more targeted campaigns, the team is segmenting our current opportunities by the Education Level demographic. Let’s use a left join to add demographic data to the opportunity data.

Consider the following two data streams that feed the recipe’s target dataset. To illustrate how this recipe function handles unmatched rows and duplicate keys, we included them in both data streams.

![The new dataset contains columns from both data streams.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_recipeTransformations_leftJoin_dataStreams.png)

After performing the left join based on the matching keys, the recipe produces the following target dataset.

![The new dataset contains columns from both data streams.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_recipeTransformations_leftJoin_results.png)

All rows from the left, including rows without a match and rows with multiple matches, are included in the target. Because Opp\_ID 1 has two matches on the right (High School and Secondary School), the target contains a separate record for each education level. Also, because Opp\_ID 4 doesn’t have a match, the Opp\_id and Education Level columns are null for that record.

#### See Also

- [Join Node: Add Related Columns of Data to the Recipe](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_join_data.htm&release=264.0.0&type=5 "Use a join node in CRM Analytics to add columns of data from related objects to existing data in a recipe. When working with CRM Analytics datasets and external objects, add a join node on the recipe canvas. When working with Salesforce objects, you can either create a join on the recipe canvas or join the data when you first create your dataset on the Add Input Data screen.")