How to get first file and last file in data?

I have a index pattern with data with files for every business day(i have a run time field named business time/day) which is the business day and time everyday.

Now I want to show a visualization/dashboard to get the batch duration(I have a field) on the first file on a daily basis(every day in a certain time in a business time) and the last file in the same business day.

So I just want the first file and last file loaded every day on a daily basis(which is in the data everyday)

How would I approach this? a scripted field? Not sure? thank you!

You could do that with a top hits aggregation, and sort asc/desc on timestamp to get each one.

thank you, how would I use this for kibana dashboards/visulizations?

is it possible to show this in a dashboard visulization in kibana?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.