geo-registry

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.
About this operation
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
  • left_key → column
  • right_key → other_column
  • left → map
  • right → other_table
  • Adds the other table's columns to the map's own attribute table in place; there is no separate output.
qgis native:joinattributestable
  • left_key → FIELD
  • right_key → FIELD_2
  • how → DISCARD_NONMATCHING : left = no; inner = yes
  • left → INPUT
  • right → INPUT_2
  • output → OUTPUT
  • By default (METHOD 1) takes only the first matching row, so duplicate keys do not multiply rows, unlike Columbus's join.