If i want to give  variable value i.e.., 'result.id' in the command then
how to append the variable value 'result.id' in to the string.

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.id+' ) as (name:chararray);


On Fri, Feb 17, 2012 at 8:56 PM, Dmitriy Ryaboy <[email protected]> wrote:

> This is not currently possible. It's also ill-defined since 'result' is a
> relation, not a scalar. What you really want is to call an hbase lookup
> udf, to ensure you get a single record back, not to use the result of a
> table scan in another table scan.
>
> The way to get this done 'properly' is to implement partition push down in
> hbase storage. This is nontrivial and valuable. If someone has cycles to do
> it, that would be a great patch.
>
> On Feb 17, 2012, at 12:19 AM, chethan <[email protected]> wrote:
>
> > Hi,
> >
> > I want to issue command inside command in PIG Script.
> >
> > command 1 : result = load 'hbase://sample_names' using
> > org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:fname','-loadKey
> true
> > -gt 1 -lt 3') as (id:chararray);
> > command 2 : user_links = load 'hbase://sample_names' using
> > org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:fname','-loadKey
> true
> > -gt result') as (name:chararray);
> >
> > user_links = load 'hbase://sample_names' using
> > org.apache.pig.backend.hadoop.hbase.HBaseStorage('cf:fname','-loadKey
> true
> > -gt command 1') as (name:chararray);
> >
> > Thanks & Regards
> > Chethan Prakash.
>

Reply via email to