Power Query - select latest file
Hi!
I’m grappling with the following structure:
Twice per day, at 7:30 and at 14:00, an exported csv file is added to a sharepoint folder. The csv shows a snapshot of the current state of system data, so there’s no need for all of the csvs to be ingested. I need to always ingest the latest file. The naming convention is “export yyyy-mm-dd hh-mm-ss”.
I tried using sharepoint folder as my connector, navigating to the specific subfolder, sort by date added, keep only top row. So far so good, but the next step in the query hardcodes the file name. The next version of the file will have a different timestamp, so the hardcoded name doesn’t correspond to the latest file anymore.
Any other approach come to mind?
[link] [comments]
Want to read more?
Check out the full article on the original site