Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala - Lag value through Nulls

Highlighted

Impala - Lag value through Nulls

Explorer

hi all,

 

I am trying to lag a value in Impala while the value is a null. So it must basically lag the value until it hits the next not null value...

 

from SQL, i found this to work:

ISNULL(Life, (SELECT TOP 1 Life FROM #TempTable WHERE [Row] < t.[Row] AND Life IS NOT NULL ORDER BY [Row] DESC))

 

Hope you can help with a solution.. i am under a bit of pressure to sort this out...

 

Kind Regards,

Lucille

3 REPLIES 3

Re: Impala - Lag value through Nulls

Cloudera Employee

Hi Lucile,

 

I don't quite understand what it is you want. Is there another database that implements this functionality?

 

Thanks

Highlighted

Re: Impala - Lag value through Nulls

Explorer

Hi,

 

I found a work around.

 

Thank you so much,

Lucille

Highlighted

Re: Impala - Lag value through Nulls

New Contributor

Hi,

 

Can you please share work-around solution? I'm facing the same problem.

 

Thanks.

Don't have an account?
Coming from Hortonworks? Activate your account here