pig-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Coveney <jcove...@gmail.com>
Subject Easy question...difference between this::form and this.form?
Date Fri, 03 Dec 2010 21:03:55 GMT
It's very hard to search for this among the docs because it's so generic, so
I thought I'd ask... I'm sure the answer is painfully easy.

Taking a look at this code that I found online, for example

--
-- Read in a bag of tuples (timeseries for this example) and divide the
-- numeric column by its maximum.
--
%default DATABAG 'data/timeseries.tsv'

data       = LOAD '$DATABAG' AS (month:chararray, count:int);
accumulate = GROUP data ALL;
calc_max   = FOREACH accumulate GENERATE FLATTEN(data),
MAX(data.count) AS max_count;
normalize  = FOREACH calc_max GENERATE data::month AS month,
data::count AS count, (float)data::count / (float)max_count AS
normed_count;
DUMP normalize;

What purpose does data::month serve versus data.count?

Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message