Skip to content

How to get the latest two events on a specific window using Flint? #85

@kant777

Description

@kant777

How to get the latest two events using this library?

Say I have the following

time    | price
---------------
1000L | 40
2000L | 20
3000L | 80
4000L | 10
5000L | 60
6000L | 30

I want to do operations like

  1. Get the last 2 events or last 4 events in the past 6 hours
  2. Difference in price for the last two events in 6 hours.

How to do this using Flint? I can write my own udf and solve this but I am wondering if there is any inbuilt function that is already available?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions