Scroll to navigation

DBADB(1) General Commands Manual DBADB(1)

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, or CREX encoding.

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


Print a help summary.

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

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

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.

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

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.

Import data into the database.

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.

The database is specified with --url or with the DBA_DB environment variable.


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

Print information about the database.

OPTIONS

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

Options used to connect to the database

alias of --url, used for historical compatibility
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)
wipe database before any other action

Options used to filter messages

match messages with the given data category
match BUFR messages with the given data subcategory
match CREX messages with check digit (if 1) or without check digit (if 0)
match only messages that can be parsed
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 output

Option for command stations

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

Option for command wipe

-?, --help
print an help message
verbose output
just remove the DB-All.e data and tables

Option for command cleanup

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

Option for command repinfo

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

Option for command import

-?, --help
print an help message
verbose output
format of the input data ('bufr', 'crex', 'csv', 'json')
write unprocessed data to this file
overwrite existing data
force data to be of this type of report
Prefer speed to transactional integrity: if the import is interrupted, the database needs to be wiped and recreated.
do not import data attributes
merge pseudoana extra values with the ones already existing in the database
import messages using precise contexts instead of standard ones
only import variables with the given varcode(s)
recovery strategy to use when importing values outside a variable domain. Possible values: 'unset' (ignore error and consider the value as unset), 'clamp' (ignore error and replace the value with the closest extreme of the valid domain)

Option for command export

-?, --help
print an help message
verbose output
force exported data to be of this type of report
format of the data in output ('bufr', 'crex', 'json')
template of the data in output (autoselect if not specified, 'list' gives a list)
dump data to be encoded instead of encoding it

Option for command delete

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

Option for command info

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

AUTHOR

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

January 10, 2023