How do you join multiple columns?

Metabase 0.33 introduced table’s join using GUI; take the example below and suppose you need to join table A with table B using both cd_empresa and cd_produto, how do you do that? from what I can tell you would need to join table B multiple times, one for cd_empresa and one for cd_produto.

table A
cd_empresa
cd_produto

table B
cd_empresa
cd_produto

2 Likes

Hi @kelsen.faria
Currently, the UI expects a single primary key, when joining data.
You would have to do multiple joins or create a view, where you combine the two columns into a single column, so you can use that for joins.
I think this issue would be the one to upvote - even though it was created long before the UI had a join function:
https://github.com/metabase/metabase/issues/7335

EDIT: In general, Metabase doesn’t handle multiple entity/primary keys:
https://github.com/metabase/metabase/issues/2925
https://github.com/metabase/metabase/issues/5648

1 Like

thank you @flamber