Foreign Keys Visual Editor

Hi, i’m using visual editor to build a question connecting 3 tables. I have set the correct Primary Key and Foreign Keys in the data model
Table1
Code - PK
Table 2
Code - FK
Table3
Code - FK
I have 2 quick questions

  • If i start my question from Table 2 and join to Table 1 the editor automatically joins the FK to PK which is what we would like to see. However when we start the question with Table 1 and join to Table 2 it does not do that, is there a reason for not doing it?
  • Also, no matter what we do, it does not work when we join Table 3.
    We plan to use metabase with our end users who are not comfortable writing sql and would benefit a lot from the visual editor.
    Thanks!

Hi @PK1109
Currently Metabase doesn’t read in both directions, so if Table1 doesn’t have a Foreign Key linking to Table2 and Table3, then it doesn’t know of the link automatically, when starting the question from Table2 or Table3.
There’s a request open for exposing linking to both sides:
https://github.com/metabase/metabase/issues/1177 - upvote by clicking :+1: on the first post