3

How can I realize below SQL query use offset for paging query in KQL.

select * from testtable where code = '88580' limit 1000 offset 111

I can't find any function in KQL can like the offset in SQL

sheldonzy
  • 5,505
  • 9
  • 48
  • 86
Tarhone
  • 45
  • 5

1 Answers1

6

Note that for pagination Kusto has Stored query results which is used for pagination, and allows you to filter easily on the row numbers.

I'm not aware of offset in KQL, but you can add a row_number, and filter by it:

let testtable = datatable(code: int) [
    1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
    11, 12, 13, 14, 15
];
testtable
| where code > 0
| serialize
| extend _row=row_number()
| limit 1000
| where _row > 10
sheldonzy
  • 5,505
  • 9
  • 48
  • 86