You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.name has a fieldID = 27 in the example above.
Orders.userID has a fieldID = 11 in the example above.
We should allow Filter subclasses to filter on fields on foreign tables.
The text was updated successfully, but these errors were encountered:
Metabase allows filtering on fields from another table joined through a foreign key. It compiles the MBQL for such filter as follows:
This differs from a "regular" filter on a direct table field:
Here,
{source-field: 11}
represents thefieldID
of the foreign key in the local table. For example, if usingOrders
as the base table with a foreign keyuserID
toUsers
with aname
field that we wanted to filter on:Users.name
has afieldID = 27
in the example above.Orders.userID
has afieldID = 11
in the example above.We should allow
Filter
subclasses to filter on fields on foreign tables.The text was updated successfully, but these errors were encountered: