dbadb

Langue: en

Autres versions - même langue

Version: 332241 (ubuntu - 24/10/10)

Section: 1 (Commandes utilisateur)

NAME

dbadb - Manage the DB-ALLe database

SYNOPSIS

dbadb [command] [options] [args...]

DESCRIPTION

It allows to initialise the database, dump its contents and import and export data using BUFR, CREX or AOF encoding.

dbadb always requires a non-switch argument, that indicates what is the operation that should be performed:

help

Print a help summary.
help manpage

Print this manpage.
dump [options] [queryparm1=val1 [queryparm2=val2 [...]]]

Dump data from the database. Query parameters are the same of the Fortran API. Please see the section "Input and output parameters -- For data related action routines" of the Fortran API documentation for a complete list..
wipe [options] [optional rep_memo description file]

Reinitialise the database, removing all data. Reinitialisation is done using the given report code description file. If no file is provided, a default version is used.
import [options] filename [filename [ ... ] ]

Import data into the database.
export [options] rep_memo [queryparm1=val1 [queryparm2=val2 [...]]]

Export data from the database. Query parameters are the same of the Fortran API. Please see the section "Input and output parameters -- For data related action routines" of the Fortran API documentation for a complete list..
repinfo [options] [filename]

Update the report information table. Update the report information table with the data from the given report code description file. If no file is provided, a default version is used.
cleanup [options]

Perform database cleanup operations. The only operation currently performed by this command is deleting stations that have no values. If more will be added in the future, they will be documented here..
stations [options] [queryparm1=val1 [queryparm2=val2 [...]]]

List the stations present in the database. Query parameters are the same of the Fortran API. Please see the section "Input and output parameters -- For data related action routines" of the Fortran API documentation for a complete list..
delete [options] [queryparm1=val1 [queryparm2=val2 [...]]]

Delete all the data matching the given query parameters. Query parameters are the same of the Fortran API. Please see the section "Input and output parameters -- For data related action routines" of the Fortran API documentation for a complete list..

OPTIONS

dbadb follows the usual GNU command line syntax, with long options starting with two dashes (`-').

Options used to connect to the database

--dsn=(null)
DSN, or URL-like database definition, to use for connecting to the DB-All.e database (can also be specified in the environment as DBA_DB)
--user=(null)
username to use for connecting to the DB-All.e database
--pass=(null)
password to use for connecting to the DB-All.e database

Options used to filter messages

--category=num
match messages with the given data category
--subcategory=num
match BUFR messages with the given data subcategory
--check-digit=num
match CREX messages with check digit (if 1) or without check digit (if 0)
--unparsable
match only messages that cannot be parsed
--parsable
match only messages that can be parsed
--index=expr
match messages with the index in the given range (ex.: 1-5,9,22-30)

Option for command dump

-?, --help
print an help message
--verbose
verbose output

Option for command wipe

-?, --help
print an help message
--verbose
verbose output

Option for command import

-?, --help
print an help message
--verbose
verbose output
-t type, --type=type
format of the input data ('bufr', 'crex', 'aof')
-f, --overwrite
overwrite existing data
-r rep, --report=rep
force data to be of this type of report, specified with rep_cod or rep_memo values
--fast
Ignored. This option is left here for compatibility with old versions of dbadb.
--no-attrs
do not import data attributes
--full-pseudoana
merge pseudoana extra values with the ones already existing in the database

Option for command export

-?, --help
print an help message
--verbose
verbose output
-r rep, --report=rep
force exported data to be of this type of report, specified with rep_cod or rep_memo values
-d type, --dest=type
format of the data in output ('bufr', 'crex', 'aof')
-t type.sub.local, --template=type.sub.local
template of the data in output (autoselect if not specified)
--dump
dump data to be encoded instead of encoding it

Option for command repinfo

-?, --help
print an help message
--verbose
verbose output

Option for command cleanup

-?, --help
print an help message

Option for command stations

-?, --help
print an help message

Option for command delete

-?, --help
print an help message

TEMPLATE NAMES

This is a list of possible template names for the export --template switch:
acars

Cagegory 4, subcategory 255, local category 145.
airep

Cagegory 4, subcategory 255, local category 142.
amdar

Cagegory 4, subcategory 255, local category 144.
buoy

Cagegory 1, subcategory 255, local category 21.
generic

Cagegory 255, subcategory 255, local category 0.
metar

Cagegory 0, subcategory 255, local category 140.
pilot

Cagegory 2, subcategory 255, local category 91.
synop

Cagegory 0, subcategory 255, local category 1.
temp

Cagegory 2, subcategory 255, local category 101.
tempship

Cagegory 2, subcategory 255, local category 102.

It is also possible to specify a template directly by number, with the syntax "category.subcategory.localcategory", for example: "1.255.21" for buoy templates.

AUTHOR

dbadb has been written by Enrico Zini <enrico@enricozini.com> for ARPA Emilia Romagna, Servizio Idrometeorologico.