arrow_back Spark SQL - FIRST_VALUE or LAST_VALUE

2 months ago link more_vert
Raymond Raymond
articleArticles 546
imageDiagrams 49
codeCode 2
chat_bubble_outlineThreads 8
commentComments 250
loyaltyKontext Points 6005
account_circleProfile
#1732 Re: Spark SQL - FIRST_VALUE or LAST_VALUE

Hi Nikesh,

To make it simple, you can register your DataFrame as a temporary view and then you can use Spark SQL functions to aggregate and using these functions like first_value or last_value. 

format_quote

person Nikesh access_time 2 months ago
Re: Spark SQL - FIRST_VALUE or LAST_VALUE

Thanks for the article!

Do you know the Scala equivalent of this, I used the first, but it its not picking up the first not null value, its just picking the first value.

20221023111909-image.png

recommendMore from Kontext