Skip to main content

Power BI

Needs Votes

File.Contents should support extracting a part of a file

Vote (2) Share
John Doggett's profile image

John Doggett on 14 Mar 2020 09:51:39

When developing queries with PowerQuery, it can be useful to operate on a small subset of the data in order to speed testing.

If the start of a query is File.Contents () , there is no way to limit the amount of data that is read from the file, so the whole file gets pulled into memory. This can easily be a bottleneck.

So File.Contents () should support a parameter or two, to specify a subset of the file to read. For example, File.Contents("file.ext", start, size)