Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joins with multiple conditions (matching fields) #49204

Open
kannes opened this issue Jun 30, 2022 · 1 comment
Open

Joins with multiple conditions (matching fields) #49204

kannes opened this issue Jun 30, 2022 · 1 comment

Comments

@kannes
Copy link
Contributor

kannes commented Jun 30, 2022

Feature description

Currently, if one wants to join two layers in the UI of the layer properties, one can only select a single field on each layer to evaluate for matching values.

This is fine and easy if you have unique IDs. But it does not support joining of data that needs multiple fields to match.

E. g. to join two layers that have address data in multiple fields like "city", "street", "housenumber", one has to first create (virtual) fields on both layers and then use those two fields for the join. This is not easily discoverable for newcomers, not super easy and potentially slow.

In SQL speak: Currently one can only use one condition in a JOIN ("JOIN b ON a.field = b.field"), not multiple conditions ("JOIN b ON a.field_1 = b.field_1 AND a.field_2 = b.field_2").

It would be great if we could specify multiple fields to match per JOIN (for the same joined layer).

Additional context

I am surprised but could not find a prior feature request for this, sorry if I missed it. #29846 is related as it would allow the use of expressions to calculate new values on the fly but that's something for advanced users and potentially slow in comparison.

@EnFiore
Copy link

EnFiore commented Sep 1, 2022

I have the same issue. This problem force to duplicate layer and it is no much efficiently. Similar request in #46131

@alexbruy alexbruy added the Joins label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants