Forum Discussion
Incremental refresh for custom connector with call to REST API: RangeStart and RangeEnd
- 2 years ago
Finally we found the solution:
It is all up to query folding. The article helped a lot:
https://bengribaudo.com/blog/2022/01/20/6500/power-query-m-primer-part-23-query-folding-i
One does not need to define RangeStart nor RangeEnd parameters anywhere in the connector.
Instead one should implement Table.View as shown here:
https://learn.microsoft.com/en-us/power-query/samples/trippin/10-tableview1/readmeThe only missing information is that one need to implement OnSelectRows.
Further information:
https://community.fabric.microsoft.com/t5/Power-Query/Query-folding-Table-View-handler-function-to-filter-rows-add/td-p/3154149br, Michael
Ok, can you give an example for that filter within an custom connector?
I don't have an example for that. Best I can give you is this
let
Source = PowerBIRESTAPI.Navigation(),
#"Filtered Rows" = Table.SelectRows(Source{[Key="AppWorkspace"]}[Data]{[Key="RefreshHistory"]}[Data], each DateTime.From([Start Time]) >= RangeStart and DateTime.From([Start Time]) < RangeEnd)
in
#"Filtered Rows"
That likely doesn't fold, so the performance benefits are minimal (the space benefits still apply).
- emikelsoft2 years agoHelper I
There are many examples like this on the internet. But unfortunately not any showing how to so that in a custom connector. Where should RangeStart and RangeEnd be defined. You cannot not just use this patameters without defining them before.
Anyway, thank you for your help