Dealing with pagination with Power Query

I am just hoping this might save someone some frustration when trying to build PQ’s against objects that have over 1000 records.

This article provides most of the steps, but it seems that it no longer works as stated. There are two modifications regarding data typing that need to be done:

let loadJSON= (Page as text, AmountOfRecords as number) =>

AmountOfRecords needs to instead be cast as a string.

let loadJSON= (Page as text, AmountOfRecords as text) =>

Then, when creating the custom function, the number of records needs to be recast as a string.

=KnackImport([Page],Number.ToText(1000))