Support Questions
Find answers, ask questions, and share your expertise

Fetch the most recently updated record from hive based on last updated timestamp column.

Highlighted

Fetch the most recently updated record from hive based on last updated timestamp column.

Hi Folks out there,

Currently I have a scenario where i have to get only latest record per id from hive table based on timestamp.

I am looking for best approach to do it. My data is in hive internal table with parquet files.Similar to this

Using spark+hive.

Thanks,

2 REPLIES 2
Highlighted

Re: Fetch the most recently updated record from hive based on last updated timestamp column.

With the help of analytical functions (row number) you can get latest updated values from the hive table

Highlighted

Re: Fetch the most recently updated record from hive based on last updated timestamp column.

Thanks for your answer, As i mentioned there are multiple ways to do it however i am looking for best ways to do on performance stand point.