Relate the prepared sources, transformation tutorial

Now that the base customer data is appended with the additional info and the rows are limited to the manager's local customers, the new Prepared_Customers source can be related to another corporate table. The corporate table that tracks orders has an OrderID column that can be used to count the number of orders per customer.

Go to the Relate page.

Select the Prepared_Customers prepared source, and the spreadsheet CorpData_xlsx orders table raw source. Modeler displays the columns of each table.

The same concept of a join applies here. Click CustomerID in Prepared_Customers and the same in orders to have Modeler relate the CustomerIDs to each other. The default join type, an inner join, is good.

Then deselect orders and select Prepared_MyPromos to create another relationship using the CustomerID key.

How is relating different from merging? They both deal with two tables that each have the same key column, and they both use joins to define the rows in the resulting table. You use a relationship when you need all the data from each table, and the data must be logically related, using the key, so that the rows make sense. A merge is more appropriate when you want to simplify the data sources that is available for reports, by combining multiple tables (sheets) into one.

In the Relate page you do not have to save anything. When you are done, you can go to Visualizer to make a report.