App-RecordStream
view release on metacpan or search on metacpan
doc/recs-collate.pod view on Meta::CPAN
=head1 NAME
recs-collate
=head1 recs-collate --help-all
Help from: --help-aggregators:
array: collect values from provided field into an array
average, avg: averages provided field
cb, countby: counts by unique value for a field
concat, concatenate: concatenate values from provided field
corr, correl, correlation: find correlation of provided fields
count, ct: counts (non-unique) records
cov, covar, covariance: find covariance of provided fields
dcount, dct, distinctcount, distinctct: count unique values from provided field
first: first value for a field
firstrec, firstrecord: first record
last: last value for a field
lastrec, lastrecord: last record seen
linearregression, linreg: perform a linear regression of provided fields, dumping various statistics
max, maximum: maximum value for a field
min, minimum: minimum value for a field
mode: most common value for a field
perc, percentile: value of pXX for field
percentilemap, percmap: map of percentile values for field
recformax, recformaximum, recordformax, recordformaximum: returns the record corresponding to the maximum value for a field
recformin, recforminimum, recordformin, recordforminimum: returns the record corresponding to the minimum value for a field
records, recs: returns an arrayref of all records
stddev: find standard deviation of provided field
sum: sums provided field
uarray: collect unique values from provided field into an array
uconcat, uconcatenate: concatenate unique values from provided field
valuestokeys, vk: use one key-value as a key for a different value in the record
var, variance: find variance of provided field
Help from: --help-basic:
Usage: recs-collate <args> [<files>]
Take records, grouped togther by --keys, and compute statistics (like
average, count, sum, concat, etc) within those groups.
For starting with collate, try doing single --key collates with some number
of aggregators (list available in --list-agrregators)
Arguments:
--dlaggregator|-A ... Specify a domain language
aggregate. See "Domain Language
Integration" below.
--aggregator|-a <aggregators> Colon separated list of
aggregate field specifiers. See
"Aggregates" section below.
--mr-agg <name> <map> <reduce> <squish> Specify a map reduce
aggregator via 3 snippets,
similar to mr_agg() from the
domain language.
--ii-agg <name> <initial> <combine> <squish> Specify an inject into
aggregator via 3 snippets,
similar to ii_agg() from the
domain language.
--incremental Output a record every time an
input record is added to a
clump (instead of every time a
clump is flushed).
--[no]-bucket With --bucket outputs one
record per clump, with --no-
bucket outputs one record for
each record that went into
the clump.
--key|-k <keys> Comma separated list of key
fields. May be a key spec or
key group
--dlkey|-K ... Specify a domain language key.
See "Domain Language
Integration" section in --help-
more.
--size|--sz|-n <number> Number of running clumps to
keep.
--adjacent|-1 Only group together adjacent
records. Avoids spooling
records into memeory
--cube See "Cubing" section in --help-
more.
--clumper ... Use this clumper to group
records. May be specified
multiple times. See --help-
clumping.
( run in 1.432 second using v1.01-cache-2.11-cpan-39bf76dae61 )