Table relation and Tableau :
When we relate two tables in tableau, it links both tables by the primary key first table with the foreign key of another table by the same column name.
In the above example, the “customer” table and “order” table are related by the column name “customer ID”. The customer ID of the customer table is the primary key and the same customer ID will be the foreign key in the order table
In the above example, we can join another table also. Say for example we are joining the product table and order table. Here we both relate by the common column name “Product ID” where the product ID of the order table will be the foreign key and the Product ID of the product table will be the primary key.
If in case we don't have the same column name we can select the particular column which is common in the customer and order table.
In the above example, we have customer ID as “Customer ID” in the customer table and “cust ID” in the order table so we have the same column content but the column name is different. Here we have to choose the particular columns and then relate them.
The same column selected now tableau can relate easily :
we can join tables with the “Union” option.
By selecting the Union option, a connection window will pop up there we have to place the tables we want to join.