Forum Discussion

Luggruff's avatar
Luggruff
Frequent Visitor
4 years ago

List files in folder without metadata

Hi,

 

I created a two queries for two folders, in order to to list files in them and then merge the first query with "Left Outer (all from first, matching from second)" type of join on the File Name, and then expand the File Name, in order to compare which ones exist in the folder I expect to have less files than the other.

The problem is, that each time I refresh, it seems to loop through all the files and get all the metadata. I can confirm this by the fact that the source step has a table where it lists the binary content for each row.

It it somehow possible to remove that right from the start to significantly improve the query refresh time? The two folders total over 1500 Excel files, and the refresh takes 10-15 minutes. I only need the file names in the folder..

2 Replies

    • Luggruff's avatar
      Luggruff
      Frequent Visitor

      Hi, sorry for the late reply. This does not work, and is what I have tried. Power BI will still loop through every single file. The source step shows a content column with binary tables, which is the actual content of the files, meaning it has already loaded the data.

      For now, I solved it by creating a Power Automate Desktop flow listing the files in the folder, then exporting that to a .csv file which I then run through Power BI instead, as it will only contain text lines of the file names. It is less optimal though, as I manually have to run it before refreshing Power BI.