Tableau Relationships: Basics – Logical Layer & Physical Layer

Data

Tableau Relationships: Basics – Logical Layer & Physical Layer

Relationships work on what Tableau calls the Logical Layer, while traditional joins work on the Physical Layer. Let’s have a look at what those two layers actually mean and why they have their names.

 

Tableau’s Physical Layer

So, the Physical Layer is the one we were used to until Relationships were introduced. We dragged tables into our data source view in Tableau and joined them. Of course, in the early days, this layer didn’t have a name, it was just the canvas of our data source. The name “Physical Layer” is derived from the physical tables that we drag into this layer. This means we can see every table from a database on the left in our data source view.

Tableau’s Logical Layer

The Logical Layer, on the other hand, works with the results of the Physical Layer. In other words: The new entity that we build by joining physical tables, which doesn’t exist anywhere in our database, is a logical table. If we only have one physical table without any joining happening, then the logical table that results from it is exactly the same.

Logical tables then can, or rather have to be, related to each other. This relationship is defined by at least one field, on which these two logical tables will be connected in the end. This is quite similar to a join, where we define at least one identifying field that tells Tableau which rows of both physical tables belong to one another.

Note, that once this relationship is established, Tableau doesn’t do anything else in the Logical Layer. The actual connection of both logical tables does not happen until we are in the view (more on that in the “1st Rule of Relationships” in the next chapter of this series).

How the Layers Interact

Since Tableau version 2020.2, the Logical Layer is the first layer we see when we open up our data source in Tableau. Dragging in tables from the left (physical tables), adds them – without us seeing it – to the Physical Layer, which then results in the logical table (the grey rectangles).

Tableau Physical Layer & Logical Layer

As you can see, the Physical Layer is still there, although hidden behind the Logical Layer. We can still join tables in the traditional way if we want to. Double-click on one of the rectangles to open the Physical Layer and join tables. You can leave the layer by clicking the x on the far upper right. Note that whenever there are physical tables joined somewhere, the resulting logical table (the grey rectangle) will show a tiny Venn diagram.

In the view where we build our visualizations, we also see a difference between the layers. In the case that we have only one logical table in our data source, which may be comprised of joined physical tables, we then see those physical tables in our view. But when we have more than one logical table – in other words, when we have a relationship somewhere – we will always see these logical tables in our view. Let’s have a look at the differences:

 

There is one more place where the difference between the Physical Layer and Logical Layer has serious implications that we will cover in a later post. I am talking about extracts. The very first option within the extract edit window is whether Tableau should build extract tables for logical tables or for physical tables. In most cases, we should go for the first option. Sometimes, but not very often, extracts of physical tables can make the extract faster. Tableau’s own documentation for that is pretty straightforward, but we will soon dedicate an article to that topic that might be easier to follow.

The next chapter will cover the ground rules of relationships.

More About the Author

Sebastian Deptalla

Analytics Lead
Dynamic Zones in Tableau (or Hide and Show via Parameter) When Tableau version 2022.3 was released, expectations for new features were quite low in the Tableau community. There were a lot of ...
Tableau Relationships: Performance – Breaking the Cardinality Let’s go deeper and see what happens when we break the cardinality, or in other words, use it in a way it’s not designed for. Also, it ...

See more from this author →

Subscribe to our newsletter

  • I understand that InterWorks will use the data provided for the purpose of communication and the administration my request. InterWorks will never disclose or sell any personal data except where required to do so by law. Finally, I understand that future communications related topics and events may be sent from InterWorks, but I can opt-out at any time.
  • This field is for validation purposes and should be left unchanged.

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072