Help statement for relBbkUser
BbkUser V3.2 - General bookkeeping query program
Usage:
BbkUser [OPTIONS] COLUMNS
BbkUser [OPTIONS] [--list | --list-columns | --list-tables] [TABLES | COLUMNS]
where COLUMNS can be one or more of the following 83 data items to return
rowcount alias ali_tagdate dataset ds_name ds_events ds_lumi input_ds
ds_description ds_maintainer link_status dse collection extcoll events
tot_events events_in dse_type is_local dse_status run_sel dse_run_sel ndses
dse_on_peak dse_run_cycle dse_modenum dse_lumi dse_nruns tot_dse_lumi
mergenum reject_status reject_type reject_value nrejects reject_nev
reject_lumi tot_reject_nev tot_reject_lumi run_status pr_lumi tot_lumi
dtr_events tot_dtr_events run_cycle run nruns first_run last_run on_peak
run_events tot_run_events l3_lumi tot_l3_lumi condalias bkg modenum input_dse
ete_nev ete_lumi ete_rel_id release rel_name rel_precedence skim stream
skimstate file lfn filenum file_suffix components bytes gbytes uuid checksum
nfiles tot_bytes tot_gbytes file_status site_local site_name comp_name
comp_description
and OPTIONS can be one or more of the following 95 selectors
--use_alias --limit --group_by --order_by --distinct --where --having --with
--inner --outer --alias --ali_tagdate --dataset --ds_name --ds_events
--ds_lumi --input_ds --ds_description --ds_maintainer --ds_tagdate
--link_status --prune --dse --collection --events --tot_events --events_in
--dse_type --is_local --dse_status --dse_run_sel --ndses --dse_on_peak
--dse_run_cycle --dse_modenum --dse_lumi --dse_nruns --tot_dse_lumi
--reject_status --reject_type --reject_value --nrejects --reject_nev
--reject_lumi --tot_reject_nev --tot_reject_lumi --reject_prune --use_reject
--rejected_runs --run_status --pr_lumi --tot_lumi --dtr_events
--tot_dtr_events --reject_runs --run_cycle --run --nruns --first_run
--last_run --on_peak --run_events --tot_run_events --l3_lumi --tot_l3_lumi
--condalias --bkg --modenum --input_dse --ete_nev --ete_lumi --ete_rel_id
--release --rel_name --rel_precedence --skim --stream --skimstate --file
--lfn --filenum --file_suffix --components --bytes --gbytes --uuid --checksum
--nfiles --tot_bytes --tot_gbytes --file_status --site_local --site_name
--comp_name --comp_description
For each of these selectors, --nooption and (except for --use_alias --limit
--distinct --prune --reject_prune --use_reject --rejected_runs --reject_runs)
--option-file can also be specified. There are also data items and selectors
table_id, table_pub_id, table_created, table_modified, and table_columns for
each table ali, ds, dtd, dse, reject, dtr, run, ete, rel, str, skim, file,
dfile, scnt, site, and comp as well as corresponding join columns in other
tables.
Other OPTIONS:
-h --help Show this help
--version Display version information for BbkUser and table modules
--list-columns List columns known to BbkUser for TABLES (use aliases,
eg. dse) or wildcard COLUMNS. For each, print column name,
config class, table name, column SQL, value and selector
method (use SQL, Perl code, or not supported), selector
type (match, wildcard, relation, range, date, or flag),
and the option name(s) if different from the column name.
--list-tables List tables known to BbkUser for TABLES (use aliases,
eg. dse). For each, prints full config class name,
table alias, full table name, number of columns in schema,
and joins defined in that class.
--list As --list-columns --list-tables
--test Show SQL SELECT query, but don't execute it
--package PKG Load additional package (default=BbkTools)
--limit [M,]N Only returns rows M (default=1) through N
--quiet Don't show header and count of number of lines
--table Show output as a table (needs large memory for big query)
--style STYLE Show output in one of these styles: list, default, adye,
csv, or html (implies --table, unless --style=list).
--display Show some columns in a more "human readable" format.
--nodisplay Show summary in basic format too.
--summary Show summary table (defaults --nooutput)
-o --output FILE Write output to FILE (defaults --quiet)
--nooutput Don't display output data
--maxfetch N Stop fetching data after reading N rows
--maxprint N Stop printing output after N rows
-s --show-sql and
--pretty-sql Show SQL query, formatted on several lines
--plain-sql Show SQL query, all on one line
--bind COLS=FILES Specify selection columns and files to read selection
values from (either COLS or FILES can have multiple
values, seperated by commas).
--show-bind Show selection values as first columns
--line-numbers Show file line numbers (and filename if multiple files)
--raw-columns Show the raw output of the SQL query instead of
using the row accessors.
--dbsite SITE Connect to database at SITE (default=slac)
--dbuser USER Database username
--dbname NAME Database name
Usually it's sufficient to specify just the database site (or connect to SLAC by
default). Other connection options are --dbtype --dbserver --dbdriver --dbpass.
@file can be used to process the file as if its contents had been entered on
the command line, but with the addition of comments (#) and with the commands
split across lines if desired.
Examples:
% BbkUser run events pr_lumi collection -dse-type=PR
% BbkUser bytes lfn --collection-file=coll.lis
% BbkUser bytes lfn --bind collection=coll.lis
% BbkUser --list-columns ali ds
Those last two examples will normally give the same results. The former uses a
single query, so may be faster, but if coll.lis is too large the database server
may not like it (Oracle seems to fail if more than a few hundred are specified).
The latter does one query per coll.lis line, so has no limits.
Author:
BbkUser was written by Tim Adye
based on a skeleton from Paul S Jackson .