Skip to content

Default Foreign Key joins only go one layer deep #12789

@mlm603

Description

@mlm603

Describe the bug
When table A is connected to table B by a foreign key and table B is connected to table C by a foreign key, users cannot select fields from table C when building queries where table A is the base.

Observed/Expected behavior
For our Marketing campaigns, we have a table of Campaign Members, with a campaign_id field. That connects to the id primary key in our Campaign table. The Campaign table has a parent_campaign_id field that connects to the id primary key on our Parent Campaign table. In the question builder, we are not able to see fields from the Parent Campaign table. We want to be able to operate on those fields.

Screen Shot 2020-06-26 at 12 39 08 PM

Information about your Metabase Installation:
Metabase v1.35.4

Severity
Medium severity. My team's data structure requires a lot of these multi-level joins and we don't want to have to make our users define these joins manually every time they need to build a query. Additionally because of the issue with dashboard filters behaving oddly with manual joins, this forces us to use SQL questions with parameters for most of our use cases.

We don't have too many users building their own reports yet, but this will become increasingly important toward the end of the year.

⬇️ Please click the 👍 reaction instead of leaving a +1 or update? comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions