The -lt -gt syntax is correct for result - it takes scalar values that define the range of the keys you want.
user_links is using -gt incorrectly. It doesn't take a Pig relationship as a parameter so it's looking for keys that are lexicographically greater than the string 'result'. On Thu, Feb 16, 2012 at 2:37 AM, chethan <[email protected]> wrote: > Hi, > > I want to fetch the records from the HBase tables using pig language. > > Details of HBase table: > > HBASE TABLE NAME : sample_names > COLUMN FAMILY NAME : cf > COLUMN NAME : fname > ROWKEY VALUES : 1,2,3,4 > > I am using following commands : > > result = load 'hbase://sample_names' using > org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:fname','-loadKey true > -gt 1 -lt 3') as (id:chararray); > user_links = load 'hbase://sample_names' using > org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:fname','-loadKey true > -gt result') as (name:chararray); > > dump result ( is giving value '2' ) > dump user_links ( returning nothing ) > > Problem: > > Though I am having value '2' in the result, > I am getting nothing in the return, it is not taking result's value '2' for > comparison at all. > > Is my approach wrong, i want the value of the result to go for comparison. > > Thanks & Regards > Chethan Prakash > -- *Note that I'm no longer using my Yahoo! email address. Please email me at [email protected] going forward.*
