Disable SORT feature in Table Panel. Unable to sort 1 million record

  • What Grafana version and what operating system are you using?
    Version 10.0.0

  • What are you trying to achieve?
    In Table Panel wanted to disable Sorting of few fields

  • How are you trying to achieve it?
    Via Settings or Any other options.

  • What happened?
    We did a initial test with 10k records of data with approx 10 string fields and we are extremally happy using the features like Pagination, Filter and Sorting.

And our actual requirement is to handle 1 million rows of data. We load these data via JSON API and it loads fine and Pagination worked fine and we were happy.

But the “Filter sections” of each field, it’s unable to load the 1 million filter items (considering all are unique filterable item) and we were stuck. Even if we disable the filter. Sort option is still enabled and when user clicks that, browser chokes. So we are in need to disable them. But no idea how to achieve that.

  • What did you expect to happen?
    Settings or Options or Custom Scripts or CLI or Plugin or any thing to disable or customize the table panel.

why is there such a requirement, what is the use case. how realistic is it that users need to see 1 million rows and make any sense of it in any tool?

Yes it may be an unrealistic count to handle in a table. But our requirement is like that.

Our Use-case is, millions of transactions happens in a day & we wanted to list them, and users uses filters and sorts to find their specific transactions. That’s it.

May be we shall try restricting loading of all rows in first place and ask for initial filter/search values to cut down the initial count.

But how do I request user input before initiating the panel requests?

in that case just like you said don’t load millions and filter on millions. load based on filters only cause I am pretty sure users are not going to need to see millions

what is your data source

It’s Json API rest call. (will use Infinity or Json API)

Thinking of having two dashboard. one as initial page with input variables and simple button or link to go next dashboard. And the next dashboard is to call datastore and display data in the table panel.

Dashboard A, will have variable inputs asking initial filter values to cut-short the row count.
And a link or button will launch the next dashboard B which has similar variables and values from Dashboard A.

In Dashboard B, Will do Datastore call with filter values. So my API will provide filtered rows.

else Will have a Single dashboard with variables set with initial default values, Every time user lands on this dashboard, will use the default values to filter the rows.

In either case, I could cut-short about half a million records. Still I dont want to provide SORT option to few fields as it may choke browser. Wondering, how to achieve this.

Since, we have no option to re-write plugin or re-write grafana, we are bound to use the grafana’s built in features, options and plugins only.

Hope, we could use Data Manipulation Panel to support getting inputs and launch Dashboard with inputs. Atleast, we are ok to write small java scripts inside these Data Manipulation Panel.

It would be great, if grafana team or plugin developers provides a plugin to write Javascripts or Pythonscripts to handle the grafana objects. Is there any in-direct method, we can achieve this?

So I would like to know, is there any better approach for my scenario?

Grafana is really a wonderful tool and it provided lot of features and we were able to rapidly achieve most of the things what we wanted but still some minor fine tuning features we would like to achieve, at-least a scripting feature (with any language like Javascript, TS, Python etc) would help the users to fill their gaps and will help avoiding all these complex workarounds.

1 Like

Amazing that your api even allows 1million to be returned. Does it allow for filtering parameter and pagination?

There are amazing plugins that do js ts. Look at dynamic text plugin and also apache echart.

But infinity should do well but the issue lies in your api. It needs to not return 1 million rows, that is nuts.

Another option is embedding grafana then a simple web app, react or angular to create all kinds of filters but depends again if your api takes filters, a lot of them

1 Like

Thanks for the info. Let me try the plugins.

1 Like

But again your api, who wrote it. It needs an overhaul or share the parameters it can use