You can combine the data from two tables by performing a left (or right), an inner join, or even a full join. An inner join will return only the records in common from the tables being joined. A left join, in contrast, will return all of the records from the left table regardless if any of those records have a match in the right table and will also return any matching values from the right table. Meanwhile, a full join will return all records from both tables (refer to the illustration below for reference). You can perform a join by selecting a left (in table 1) and a right (in table 2) column. When these variables match, both tables will be joined.
Note: In order to use the Model feature you already should have already imported data sources into the Y42.
Adding the Join Node to Your Model
- In the Model tab, click Add... Name your new data model and choose a privacy level.
- Create at least two input tables by dragging and dropping the Input field into your data model structure. Choose a data table by clicking on them, then click Apply.
- Drag and drop a Join node close to the Input fields.
- The "L" on the Join node represents the input that is going to be your left table, on the other hand, the "R" is for the right table.
Setting Up Your Join Node
- Click on the Join Node to apply the node settings. Select the type of join (left or inner join) and select matching columns on the left and right. These variables represent the matching point for both tables.
- When you're done, click Save.
Once you're done joining tables within your model, you can either perform further transformations or, if you want to export the new data table, click Commit Model.