GRASS logo

NAME

db.join - Joins a database table to another database table.

KEYWORDS

database, attribute table

SYNOPSIS

db.join
db.join --help
db.join table=name column=name [database=name] [driver=name] other_table=name other_column=name [subset_columns=name[,name,...]] [--help] [--verbose] [--quiet] [--ui]

Flags:

--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

table=name [required]
Table to which to join other table
column=name [required]
Identifier column (e.g.: cat) in the table to be used for join
database=name
Name of database
driver=name
Name of database driver
Options: dbf, odbc, ogr, sqlite, pg
other_table=name [required]
Other table name
other_column=name [required]
Identifier column (e.g.: id) in the other table used for join
subset_columns=name[,name,...]
Subset of columns from the other table

Table of contents

DESCRIPTION

db.join joins the content of one attribute table into another attribute table through common attributes.

NOTES

db.join is a front-end to db.execute to allow easier usage. The attribute table must be stored in a SQL database (SQLite, PostgreSQL, MySQL, ODBC, ...). The DBF backend is not supported. Tables can be imported with db.in.ogr.

EXAMPLES

# join soils_legend into mysoils attribute table
db.join mysoils col=label otable=soils_legend ocol=shortname

# verification of join
db.select mysoils
cat|label|id|shortname|longname
1|Aab|||
2|Ba|2|Ba|Barnum silt loam
3|Bb|3|Bb|Barnum silt loam, channeled
4|BcB|4|BcB|Boneek silt loam, 2 to 6
5|BcC|5|BcC|Boneek silt loam, 6 to 9
...

SEE ALSO

db.execute, db.in.ogr, db.select, v.db.join, v.db.update
GRASS SQL interface

AUTHOR

Markus Neteler

SOURCE CODE

Available at: db.join source code (history)

Latest change: Thursday Feb 03 09:32:35 2022 in commit: f17c792f5de56c64ecfbe63ec315307872cf9d5c


Main index | Database index | Topics index | Keywords index | Graphical index | Full index

© 2003-2024 GRASS Development Team, GRASS GIS 8.5.0dev Reference Manual