Attribute join
Adds the fields of a table to a layer by matching values in a key field.
Pitfall. Codes with leading zeros stored as text on one side and numbers on the other match nothing.
Pitfall. Duplicate keys on the right side multiply rows on the left.
| Also called | Join Field, Add Join, table join, Join attributes by field value |
|---|---|
| Group | table/join |
| Checks | join.unmatched, join.many_to_many, join.key_types, join.keys_normalized |
| Pitfalls | 2 listed above |
| Columbus tool | vector_op · join |
| Notes | Not stated |
| Status | active |
| Broader | Not stated |
| Narrower | Not stated |
| Related |
Parameters
| Name | Type | Required | Default | Values | Note |
|---|---|---|---|---|---|
left_key | field | yes | Not stated | Not stated | Not stated |
right_key | field | no | Not stated | Not stated | Defaults to the same name as left_key. |
how | enum | no | Not stated | left, inner | Keep unmatched left rows (left) or drop them (inner). |
key_as_text | boolean | no | Not stated | Not stated | Compare keys as text, for codes stored as numbers on one side. |
trim | boolean | no | Not stated | Not stated | Ignore leading and trailing spaces in keys. |
ignore_case | boolean | no | Not stated | Not stated | Not stated |
pad | integer | no | Not stated | Not stated | Zero-pad keys to this many characters before matching. |
Inputs and outputs
| Direction | Name | Type | Geometry | Note |
|---|---|---|---|---|
| Input | left | any | Not stated | Not stated |
| Input | right | table | Not stated | Not stated |
| Output | output | any | Not stated | Not stated |
In each engine
| Engine | Tool | Parameters | Differences |
|---|---|---|---|
grass | v.db.join |
|
|
qgis | native:joinattributestable |
|
|