jamal sasha 2013-10-02, 19:59
For any Pig loader that reads files from HDFS, filenames are passed directly to HDFS. This means HDFS style globs are supported, which means the answer to your question depends on the version of HDFS you have. For your version of Hadoop, take a look at the documentation for FileSystem.globStatus. It will explain the supported globs. Based on the documentation from Hadoop 1.2, I believe the following pattern would work:
A = load 'data/shard?/d1_1/[^_d2*]'
On Oct 2, 2013, at 12:59 PM, jamal sasha wrote:
> I have data in this one folder like following:
> | |_d2_1
> | |_d2_2
> | |_d2_3
> Now, I want to search something in d1 (and excluding all the d2's) in it.
> How do i do this in pig?
NOTICE: This message is intended for the use of the individual or entity to
which it is addressed and may contain information that is confidential,
privileged and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any printing, copying, dissemination, distribution, disclosure or
forwarding of this communication is strictly prohibited. If you have
received this communication in error, please contact the sender immediately
and delete it from your system. Thank You.