apache pig - Perform arithmetic operation Pig -


i want make query hbase pig. rowkeys stored using reverse timestamp (long.max_value - timestamp). pig script, want store in variable current date in format (long.max_value - currenttime) query.

load 'mydata' using org.apache.pig.backend.hadoop.hbase.hbasestorage('d:column', '-caster=hbasebinaryconverter -gte $minrowkey* -lte $maxrowkey -loadkey true' ) (rowkey:chararray,json:chararray); 

so this:

%default maxrowkey "date +%s" 

and perform subtraction long.max_value - maxrowkey query. possible ?

thanks

i did not know of existence of hbasestorage options:

-mintimestamp= scan's timestamp min timerange

-maxtimestamp= scan's timestamp max timerange

that did trick me.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -