table of contents
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:
- 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.. - 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.. - 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. - 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.. - 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. - import [options] [filter] filename [filename [ ... ] ]
-
Import data into the database. - export [options] [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.The database is specified with --url or with the DBA_DB environment variable.
- 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.. - info
-
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¶
- --dsn=url
- alias of --url, used for historical compatibility
- --url=url
- 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-first
- wipe database before any other action
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)
- --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 stations¶
- -?, --help
- print an help message
- --verbose
- verbose output
Option for command wipe¶
- -?, --help
- print an help message
- --verbose
- verbose output
- --disappear
- just remove the DB-All.e data and tables
Option for command cleanup¶
- -?, --help
- print an help message
- --verbose
- verbose output
Option for command repinfo¶
- -?, --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', 'csv', 'json')
- --rejected=fname
- write unprocessed data to this file
- -f, --overwrite
- overwrite existing data
- -r rep, --report=rep
- force data to be of this type of report
- --fast
- Prefer speed to transactional integrity: if the import is interrupted, the database needs to be wiped and recreated.
- --no-attrs
- do not import data attributes
- --full-pseudoana
- merge pseudoana extra values with the ones already existing in the database
- --precise
- import messages using precise contexts instead of standard ones
- --varlist=varlist
- only import variables with the given varcode(s)
- --domain-errors=varlist
- 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
- verbose output
- -r rep, --report=rep
- force exported data to be of this type of report
- -d type, --dest=type
- format of the data in output ('bufr', 'crex', 'json')
- -t name, --template=name
- template of the data in output (autoselect if not specified, 'list' gives a list)
- --dump
- dump data to be encoded instead of encoding it
Option for command delete¶
- -?, --help
- print an help message
- --verbose
- verbose output
Option for command info¶
- -?, --help
- print an help message
- --verbose
- verbose output
AUTHOR¶
dbadb has been written by Enrico Zini <enrico@enricozini.com> for ARPA Emilia Romagna, Servizio Idrometeorologico.
January 10, 2023 |