Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
G_Whit-UK
Helper II
Helper II

Looking for tips on using folder as data source

Hi

 

I'm looking for some tips on how best to efficiently use data stored in a folder as a data source.  At the moment, the model is inputing a number of CSV files (one per day) from a designated folder.  The CSV files are quite large and the Desktop version of Power Query appears to be struggling to cope with the volume of data.  I am therefore wondering how best to perform the intial steps within Power Query to maximise the efficiency.  I am wondering if it is a good idea to perform any bespoke steps within the "Transfer Sample File" - or would this make things worse?

 

Any useful tips on how the efficiently use data within a designated folder as a source would be approcated.

 

Thanks.

2 ACCEPTED SOLUTIONS
edhans
Super User
Super User

If you need all of the files in the folder, not much you can do. But if you only need some of the files, if the file names or other criteria, like the file date.

FOr example, in this M code, I am doing about 8-9 things where I filter for two files that begin with the letters M and P, get the latest of each, then combine (append) them into a single listing in Sharepoint, and then I hit the Combine button, where the red square is. That is where Power Query creates all of its custom steps for the combine operation. So hundreds of files, but only two get processed each refresh.

edhans_0-1603230408128.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

Jimmy801
Community Champion
Community Champion

Hello @G_Whit-UK 

 

what I'm always doing is the following

- first only filter for files your really need

- create a function to read from your CSV-file (maybe already removing columns, filtering, etc.)

- apply this funciton on the files found in the folder as a new column

- combine the tables created in your new column

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

2 REPLIES 2
Jimmy801
Community Champion
Community Champion

Hello @G_Whit-UK 

 

what I'm always doing is the following

- first only filter for files your really need

- create a function to read from your CSV-file (maybe already removing columns, filtering, etc.)

- apply this funciton on the files found in the folder as a new column

- combine the tables created in your new column

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

edhans
Super User
Super User

If you need all of the files in the folder, not much you can do. But if you only need some of the files, if the file names or other criteria, like the file date.

FOr example, in this M code, I am doing about 8-9 things where I filter for two files that begin with the letters M and P, get the latest of each, then combine (append) them into a single listing in Sharepoint, and then I hit the Combine button, where the red square is. That is where Power Query creates all of its custom steps for the combine operation. So hundreds of files, but only two get processed each refresh.

edhans_0-1603230408128.png

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors