db.describe(1grass)
π NAME π
okay bestie, gather round β db.describe is here to Describe a table in detail. that's it, that's the whole job, and it does it gorgeously β¨
π KEYWORDS π
database, json, attribute table
π¦ SYNOPSIS π¦
db.describe
db.describe --help
db.describe [-c] table=name [driver=name] [database=name]
format=name [--help] [--verbose] [--quiet] [--ui]
π Flags
-cβ print just the column names instead of the full column descriptions (she's minimal, she's chic π )--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
πΈ Parameters
table=name[required] β Name of attribute tabledriver=nameβ Name of database driver- Options:
dbf,mysql,odbc,ogr,pg,sqlite - Default:
sqlite
- Options:
database=nameβ Name of database- Default:
$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
- Default:
format=name[required] β Output format- Options:
plain,json - Default:
plain plain: Plain text outputjson: JSON (JavaScript Object Notation)
- Options:
β¨ DESCRIPTION β¨
db.describe displays table information, periodt. and if you pass the -c parameter, you get only column names instead of the full column descriptions β like, the tl;dr version of the table. iconic. π
π‘ NOTE π‘
ngl this is the part that saves your life: if the parameters for the database connection are already set with db.connect, then they get taken as default values and you do not need to type them out every single time. bestie behavior fr fr π«Ά
π§ EXAMPLES π§
Listing columns in SQLite
list column descriptions of a table in a SQLite database (and note that this is the default setting, so like, you basically get it for free):
db.describe driver=sqlite table=hospitals \
database=β$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.dbβ
# or simply
db.describe myarchsites
π DBF example
db.describe -c table=hospitals database=β$GISDBASE/$LOCATION_NAME/PERMANENT/dbf/β \
driver=dbf
ncols: 16
nrows: 160
Column 1: cat:INTEGER:11
Column 2: OBJECTID:INTEGER:11
Column 3: AREA:DOUBLE PRECISION:20
[...]
db.describe table=hospitals database=β$GISDBASE/$LOCATION_NAME/PERMANENT/dbf/β \
driver=dbf
table:hospitals
description:
insert:yes
delete:yes
ncols:16
nrows:160
column:cat
description:
type:INTEGER
len:11
scale:0
precision:10
default:
nullok:yes
select:yes
update:yes
column:OBJECTID
description:
type:INTEGER
[...]
π JSON Output
db.describe table=hospitals format=json
{
"table": "hospitals",
"description": "",
"insert": null,
"delete": null,
"ncols": 16,
"nrows": 160,
"columns": [
{
"position": 1,
"column": "cat",
"description": "",
"type": "INTEGER",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 2,
"column": "OBJECTID",
"description": "",
"type": "INTEGER",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 3,
"column": "AREA",
"description": "",
"type": "DOUBLE PRECISION",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 4,
"column": "PERIMETER",
"description": "",
"type": "DOUBLE PRECISION",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 5,
"column": "HLS_",
"description": "",
"type": "INTEGER",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 6,
"column": "HLS_ID",
"description": "",
"type": "INTEGER",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 7,
"column": "NAME",
"description": "",
"type": "CHARACTER",
"length": 45,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 8,
"column": "ADDRESS",
"description": "",
"type": "CHARACTER",
"length": 35,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 9,
"column": "CITY",
"description": "",
"type": "CHARACTER",
"length": 16,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 10,
"column": "ZIP",
"description": "",
"type": "CHARACTER",
"length": 5,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 11,
"column": "COUNTY",
"description": "",
"type": "CHARACTER",
"length": 12,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 12,
"column": "PHONE",
"description": "",
"type": "CHARACTER",
"length": 14,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 13,
"column": "CANCER",
"description": "",
"type": "CHARACTER",
"length": 4,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 14,
"column": "POLYGONID",
"description": "",
"type": "INTEGER",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 15,
"column": "SCALE",
"description": "",
"type": "DOUBLE PRECISION",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
},
{
"position": 16,
"column": "ANGLE",
"description": "",
"type": "DOUBLE PRECISION",
"length": 20,
"scale": 0,
"precision": 0,
"default": null,
"nullok": true,
"select": null,
"update": null
}
]
}
π SEE ALSO π
db.columns, db.droptable, db.execute, db.login, db.tables, GRASS SQL interface
go read those next bestie, they're all part of the same little database friend group π
π AUTHOR π
Radim Blazek, ITC-Irst, Trento, Italy
π SOURCE CODE π
Available at: db.describe source code (history)
Latest change: Thursday Oct 02 14:39:13 2025 in commit: 1850489bf42c72d8dcfe2e4db1738441b4a7dc43
Main index | Database index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page, no cap π
this was the db.describe(1grass) page from the GRASS User's Manual, version GRASS 8.5.0, last touched Thursday Oct 02 14:39:13 2025 β love that for us, slay, periodt πβ¨π¦
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms