Forum Discussion
Problem publishing after changing data source from local folder to SharePoint folder
Hi , TomRobbins
According to your description, you update the M code to change the on-premise datasource to the sharepoint folder.
But it still seem to a local data souce.Is your SharePoint Folder a shared folder on your local computer?
Whether the connector you are using is still "Folder.Files" instead of the "SharePoint.Files".
If you still use the "Folder.Files" in the M code , this may still be considered as an on-premises data source.
You can also see the data source crecdential you are using in Power Bi Desktop . Then you can publish to Power BI Service to test.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- TomRobbins3 years agoFrequent Visitor
Thanks for the reply. It's sharepoint.files in the M code, but that doesn't change what you see under data source settings which still says c:\users\xxxx\xxxxx folder path. And it indeed uses the sharepoint files as I removed the local files to be sure. Seems to me like the service looks at the data source settings when you publish to determine the data source settings. Doesn't appear to be anywhere to override that.
- v-yueyunzh-msft3 years agoCommunity Support
Hi , TomRobbins
All data sources in your dataset should still include local data sources. Yes, currently on Power BI Service, all data sources need to be configured with the correct credentials for scheduled refresh.
If you don't want to use a gateway, you can completely delete all on-premises data sources and republish them so you don't need to use a gateway.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- TomRobbins3 years agoFrequent Visitor
Yea, that's the problem. All of the reports were built pointing local drive that is synced via OneDrive. That was our mistake. We thought it would be smart enough to know it was a OneDrive location.
Opened a ticket with Microsoft because there should be a way to have the original data source settings match what is in the M code. Right now the original data source settings points to local folder path but the M code uses a SharePoint path and that works great. But in publish the service ignores what the code does and looks at any original settings you configured.