Loading
About Salesforce Data 360
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Full Outer Join

          Full Outer Join

          A full outer join includes all rows from the left and right input data source objects, regardless of whether they have matches. The join includes all matched rows in the output data when multiple rows match.

          Example
          Example

          Our company's marketing team captures demographic data in Redshift 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 full outer join to combine the opportunity and demographic data.

          Consider the following two input data sources that feed the batch data transform's output data. To illustrate how the full outer join handles unmatched rows and duplicate keys, we included them in both input data source objects.

          The left data stream shows the opportunity ID, customer name, and opportunity amount. The right data stream shows the opportunity ID and educational level.

          After performing the full outer join based on the matching the keys, the data transform produces the following output.

          The new dataset contains columns from both data streams.

          All rows—matched or not—are included in the output. Because of multiple matches, you see two records with Opp_ID 2 (Amy and Bob) and two more records with Opp_id 1 (High School and Secondary School). Opp_ID 4 and Opp_id 5 are also included despite not having a match.

          By including unmatched left records, we now know that we have to find out David’s education level to complete the output data. By including unmatched right records, we see that no customers have a PhD.

           
          Loading
          Salesforce Help | Article