Reply
New Contributor
Posts: 6
Registered: ‎06-01-2016

Impala - Lag value through Nulls

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

Cloudera Employee
Posts: 16
Registered: ‎12-19-2013

Re: Impala - Lag value through Nulls

Hi Lucile,

 

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

 

Thanks

New Contributor
Posts: 6
Registered: ‎06-01-2016

Re: Impala - Lag value through Nulls

Hi,

 

I found a work around.

 

Thank you so much,

Lucille

New Contributor
Posts: 1
Registered: ‎03-31-2017

Re: Impala - Lag value through Nulls

Hi,

 

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

 

Thanks.

Announcements