B = filter A by date == '20100819' and age < 30;
-- both date and country are partition columns
C = filter A by date == '20100819' and country == 'US';
...
不過(guò)如果假定這里存在無(wú)數(shù)個(gè)分區(qū),且我們打算利用Hcatalog通過(guò)單一請(qǐng)求對(duì)其進(jìn)行全部查詢(xún),那么Pig也將遭遇與Hive類(lèi)似的問(wèn)題。在這種情況下,使用glob與通配符來(lái)表達(dá)可能更為方便。
例如:
Partition-1, Partition-2, Partition-3,....Partition-n exist within the location /user/inputLocation/
Using globs we can provide the input to Pig as:
/user/inputLocation/{Partition-1, Partition-2, Partition-3,....Partition-n}