Skip to content

Instantly share code, notes, and snippets.

@wyukawa
Created September 16, 2012 12:23
Show Gist options
  • Select an option

  • Save wyukawa/3732210 to your computer and use it in GitHub Desktop.

Select an option

Save wyukawa/3732210 to your computer and use it in GitHub Desktop.
郵便番号データをPigで処理してみる
set pig.exec.mapPartAgg true;
A = load 'KEN_ALL_ROME.CSV'
using PigStorage(',')
as (
org_code:chararray,
postcode:chararray,
choiki_name:chararray,
choson_name:chararray,
todoufuken_name:chararray
);
B = group A by todoufuken_name;
X = foreach B generate group, COUNT(A);
dump X;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment