Forum Discussion
Steps to add folder access using on-premises gateway
Hi Guys,
my query looks like:
let
CleanPath = Text.Trim(paramLocalRepositoryPath & "/" & paramRepository),
Check = try Table.RowCount(Folder.Files(CleanPath)) otherwise 0,
isValid = if
paramEnvironment = "Remote" then true else
if
Check > 0
then
true
else
error "❌ The folder path is invalid or does not exist: " & CleanPath
in
isValid
and i am getting error :
You can't schedule refresh for this semantic model because the following data sources currently don't support refresh:
- Data source for Query1
- Data source for Query1
So i downloaded on-premises gateway,
create new connection and point to my "cleanPath" parent folder, use Folder as data connection kind and windows auth with username and password.
1. If this should work also for subfolders if i provided parent folder?
2. Must I create windows password for logged in user?
Best,
Jacek
Hi jaryszek ,
Thank you for engaging with the Microsoft Fabric Community.
1. Use the UNC path (MyFileServer\RepoRoot) instead of a mapped drive. Power Query’s Folder.Files function will then return every file in that folder and all nested subfolders, so you don’t need to register each subfolder separately.
2. Add the folder path as a Folder data source in the Manage Gateways section, and use Windows auth. If the password changes, make sure to update it in the gateway to avoid refresh failures.
reference: Folder.Files - PowerQuery M | Microsoft Learn
If my response solved your query, please mark it as the Accepted solution to help others find it easily.
And if my answer was helpful, I'd really appreciate a 'Kudos'.
1 Reply
- V-yubandi-msftCommunity Support
Hi jaryszek ,
Thank you for engaging with the Microsoft Fabric Community.
1. Use the UNC path (MyFileServer\RepoRoot) instead of a mapped drive. Power Query’s Folder.Files function will then return every file in that folder and all nested subfolders, so you don’t need to register each subfolder separately.
2. Add the folder path as a Folder data source in the Manage Gateways section, and use Windows auth. If the password changes, make sure to update it in the gateway to avoid refresh failures.
reference: Folder.Files - PowerQuery M | Microsoft Learn
If my response solved your query, please mark it as the Accepted solution to help others find it easily.
And if my answer was helpful, I'd really appreciate a 'Kudos'.