-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Metabase allows filtering on fields from another table joined through a foreign key. It compiles the MBQL for such filter as follows:
["=", ["field", 27, {source-field: 11}], 4]
This differs from a "regular" filter on a direct table field:
["=", ["field", 11, null], 5]
Here, {source-field: 11} represents the fieldID of the foreign key in the local table. For example, if using Orders as the base table with a foreign key userID to Users with a name field that we wanted to filter on:
Users.namehas afieldID = 27in the example above.Orders.userIDhas afieldID = 11in the example above.
We should allow Filter subclasses to filter on fields on foreign tables.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request