Paginate SQL queries (in Canvas)

I need to build a Canvas chart from a query that returns ~100K results.
I'm building it using an enormously helpful suggestion I found on this forum for grouping counts into columns:

| essql 
  query="SELECT COUNT(*) as hits, userid FROM \"tracking-*\" WHERE \"@timestamp\" > CURRENT_DATE - INTERVAL '1' DAY GROUP by userid"
| mapColumn "range" 
  fn={getCell "hits" | switch case={case if={all {eq 1}} then="1"} case={case if={all {eq 2}} then="2"} case={case if={all {eq 3}} then="3"} default="More"}
| sort by="range"
| pointseries x="range" y="size(hits)"
| plot defaultStyle={seriesStyle bars=.4} yaxis=true
| render

How do I get past the 1000 results limit?


Have you checked the documentation here: ?

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