The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a PowerBI file that uses R scripts as a data source. The scripts access a database, query and manipulate a few existing tables, and then imports the resulting table into PowerBI. The scripts run well on PowerBI Desktop but unfortunately when attempting to publish this to the PowerBI service, I am running into a gateway issue. I am using an On-premise data gateway that can successfully connect to the SqlServer and other files, but spits back an error related to R:
Scouring the PowerBI support forums and resources, everything that I have found only talks about generating visuals using R, and I have yet to find a resource talking about using R scripts as a datasource for PowerBI. I found this stack overflow thread from 2019, but have yet to find anything more recent.
Is it possible to use R scripts as a data source when publishing a file to the PowerBI service?
Using R scripts as a data source in Power BI can be a bit trickier when it comes to publishing to the Power BI service, especially if you're encountering gateway-related issues. Here are some considerations and potential solutions:
Gateway Configuration: Ensure that your on-premises data gateway is correctly configured and running. The gateway should have access to the database that your R scripts are querying and should be able to execute those scripts successfully.
Gateway Version: Check if you're using the latest version of the on-premises data gateway. Sometimes, newer versions include bug fixes and improvements that can resolve compatibility issues.
R Runtime Configuration: Power BI service uses a different environment than Power BI Desktop, which may affect how R scripts are executed. Make sure that your R scripts are compatible with the environment in which they are being executed, and that any necessary R packages are installed on the server running the on-premises data gateway.
Data Privacy Settings: Power BI service enforces data privacy settings to prevent data from being sent to external sources without user consent. Ensure that your R scripts and data connections comply with Power BI's data privacy rules.
Troubleshooting: Use diagnostic tools provided by Power BI service and the on-premises data gateway to troubleshoot the issue. Check gateway logs, error messages, and event logs for any clues about what might be causing the problem.
Alternative Approaches: If you're unable to resolve the gateway issue, consider alternative approaches for using R scripts in Power BI. For example, you could pre-process your data using R scripts outside of Power BI and then import the resulting dataset into Power BI as a static data source.
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!
User | Count |
---|---|
42 | |
15 | |
12 | |
11 | |
8 |
User | Count |
---|---|
51 | |
31 | |
22 | |
17 | |
15 |