community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Cartesian Join/Cartesian Product

Moderator
Moderator
Created on

Question

How can I create a Cartesian join of my data?

Answer

A Cartesian join, also known as a Cartesian product, is a join of every row of one table to every row of another table. For example, if table A has 100 rows and is joined with table B, which has 1,000 rows, a Cartesian join will result in 100,000 rows. This type of join can be useful when you need to produce a dataset that contains every combination of two or more tables. You can continue to add to the join by adding additional Append Tools. Simply connect the output of the first Append Tool to the Target Input of a second Append Tool and connect the third table to the Source Input of the second Append Tool. Continue this configuration for as many tables as necessary.

 

In the example below, a car dealer needed a list of every combination of model, exterior color, interior color and options package. Here is what the four table Cartesian join looks like:

 

Workflow.png

 

 

The tables contain the following data:

 

Model.png  ExteriorCode.png  InteriorCode.png  Package.png  

 

 

A sample of the results from the workflow pictured above looks like this:

 

Results.png

 

Important

By default, the Append Tool is set to error on more than 16 appends in order to protect the user from inadvertently producing an extensive amount of records. If your data has more appends than this, you can change this setting as shown below to allow all appends:

 

ConfigurationScreen.png

 

This workflow, created in 10.6, is attached. 

 

Thank you!

Attachments