While building dashboards, we must be cautious with the data that we are using. If data is incorrect, the whole objective fails. There will be times when we have to consume different data sets either from the same source or a different one. That’s where Data Joining and Data Blending concept plays a key role. How do we determine when to use Blending v/s Joining?
In this blog, we will look at the usage of these two in Tableau:
- It is primarily used when you have to merge data sets from the same source. For example, you want to look at Student details where his grades are coming from one source and personal information from another source. Here, the key will be the student roll number which will be unique.
There are different types of join;
1. Left join
Merging contents between 2 tables and also retaining left table details.
2. Right Join
Merging contents between 2 tables and also retaining right table details.
3. Inner join
Only the common matching data between 2 tables are displayed.
4. Full Outer Join
Result set from both the tables are merged and displayed.
Data Blending sounds similar to Join but it is not the same. Let us look at its usage:
1. It should be used when you want to analyze data available in different sources.
- For example, Actual Sales for geography like Region Name can come from one source (relational) and Month details from a different source (Excel File).
- In case you wish to visualize monthly sales for a region, you will be using Data Blending.
2. Ensure that there is a common field called “Linking field” while performing Data Blending.
3. Data Blending performs like a left join operation and does not accept or perform any other type of join.
4. Since data is coming from different sources, it is not mandatory that both data sets have the same level of detail. Data blending operation is independent of granularity.
Let us quickly summarize what we just learnt:
|S. No.||Data Joining||Data Blending|
|1||Used when the data set is from the same source||Used when the dataset is from a different data source|
|2||Ability to use different types of join (left join, right join, inner join and full outer join)||Uses only left join.|
|3||Data has to be maintained at the same level of granularity||Data can be available in different level of granularity.|
|4||Joins data at a row-level||Sends separate query to each dataset, aggregates and then performs blending|
Data Joining & Blending have their own importance and should be wisely chosen based on the requirement. It is also possible to join tables from different data sources using “Cross-Database Joins” and will be covered in the sequel blog.
To learn more about Visual BI’s Tableau Consulting & End User Training Programs, contact us here.