phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OMKAR NALAWADE <nalawadeomka...@gmail.com>
Subject Re: Access Hbase Cell Timestamp using Phoenix UDF
Date Wed, 06 Mar 2019 01:56:06 GMT
Hello,

I am trying to access cell level timestamp of a given column in a table
using a phoenix UDF.
*For example:* I have created a UDF named TS_UDF(dataType)
When we register the function using
CREATE FUNCTION TS_UDF(BOOLEAN) RETURNS BIGINT as 'com.mypackage.TsFunction.'
using jar 'hdfs:/localhost:8080/hbase/lib/myjar.jar';

In the above statement, I wish to pass a generic datatype to the TS_UDF
function instead of Boolean datatype so that it can be used for the columns
with any datatype.

Is there a way we can create a function and pass a generic datatype in
Phoenix?

I am using HDP 2.6.4 stack with HBase version 1.1.2 and Phoenix version
4.7.0

Regards,

Omkar


On Tue, Mar 5, 2019 at 4:57 PM OMKAR NALAWADE <nalawadeomkar73@gmail.com>
wrote:

>
> Hello,
> I am trying to access cell level timestamp of a given column in a table
> using a phoenix UDF.
> *For example:* I have created a UDF named TS_UDF(dataType)
> When we register the function using
> CREATE FUNCTION TS_UDF(BOOLEAN) RETURNS BIGINT as '
> com.mypackage.TsFunction.' using jar '
> hdfs:/localhost:8080/hbase/lib/myjar.jar';
>
> In the above statement, I wish to pass a generic datatype to the TS_UDF
> function instead of Boolean datatype so that it can be used for the columns
> with any datatype.
>
> Is there a way we can create a function and pass a generic datatype in
> Phoenix?
>
> I am using HDP 2.6.4 stack with HBase version 1.1.2 and Phoenix version
> 4.7.0
>
> Regards,
>
> Omkar
>

Mime
View raw message