Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Knowledge Base

Definitive answers from Designer Desktop experts.

Cartesian Join/Cartesian Product

DanC
Moderator
Moderator
Created

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.pngExteriorCode.pngInteriorCode.pngPackage.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 inadvertentlyproducing 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