Sto provando a scrivere uno script latin maiale per estrarre il conteggio di un set di dati che ho filtrato.Impossibile dedurre la funzione COUNT
Ecco lo script finora:
/* scans by title */
scans = LOAD '/hive/scans/*' USING PigStorage(',') AS (thetime:long,product_id:long,lat:double,lon:double,user:chararray,category:chararray,title:chararray);
productscans = FILTER scans BY (title MATCHES 'proactiv');
scancount = FOREACH productscans GENERATE COUNT($0);
DUMP scancount;
Per qualche ragione, ottengo l'errore:
Could not infer the matching function for org.apache.pig.builtin.COUNT as multiple or none of them fit. Please use an explicit cast.
che cosa sto facendo male qui? Suppongo che abbia qualcosa a che fare con il tipo di campo in cui sto passando, ma non riesco a risolverlo.
TIA, Jason
Questo è tutto (meno" FOREACH g "dovrebbe essere" FOREACH raggruppato ") - grazie Chris! – JasonA
Modificato, grazie per la recensione –