db.describe(1grass) GRASS GIS User's Manual db.describe(1grass)

db.describe - Describes a table in detail.

database, attribute table

db.describe
db.describe --help
db.describe [-c] table=name [driver=name] [database=name] [--help] [--verbose] [--quiet] [--ui]


Print column names only instead of full column descriptions

Print usage summary

Verbose module output

Quiet module output

Force launching GUI dialog


Name of attribute table

Name of database driver
Options: dbf, mysql, odbc, ogr, pg, sqlite
Default: sqlite

Name of database
Default: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db

db.describe displays table information. If parameter -c is used only column names instead of full column descriptions is given.

If parameters for database connection are already set with db.connect, they are taken as default values and do not need to be spcified each time.

List column descriptions of table in SQLite database (note that this is the default setting)

db.describe driver=sqlite table=hospitals \
   database=’$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db’
# or simply
db.describe myarchsites

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
[...]

db.columns, db.droptable, db.execute, db.login, db.tables, GRASS SQL interface

Radim Blazek, ITC-Irst, Trento, Italy

Available at: db.describe source code (history)

Accessed: Monday Apr 01 03:07:08 2024

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

© 2003-2024 GRASS Development Team, GRASS GIS 8.3.2 Reference Manual

GRASS 8.3.2