Is there a way to join to external data, using two dimensions as the lookup key/filter?

Wondering if there is a way to, go from a source Druid datasource, that is multi-tenant, containing an “account_id” dimension, as well as a multi-value dimension, “foo”, and use the query-time lookups, or another feature, to lookup a replacement value for the values in the foo dimension, but having the join, take into account that the lookup table should also be filtered by account_id, e.g.

— psuedo-sql:

SELECT a.account_id, b.foo_replacement FROM main_table m

JOIN external_data e

ON m.account_id = e.account_id

AND m.foo = b.foo