3

I have included an R Script in a PowerQuery in Power BI to transform data. This works in Power BI Desktop, however when I push to Power BI Server I receive the following error message when looking at the (Enterprise) gateway:

Extension{"extensionDataSourceKind":"R","extensionDataSourcePath":"R"} Cannot be added to gateway

Doing some Googling / looking at the Power BI Community pages suggests that the Enterprise Gateway does not support R Scripts - something to do with it being too memory intensive for Microsoft to want to support running R on the cloud server. But I can find very little concrete documentation on this (more opinion):

https://www.sqlgene.com/2018/09/25/power-bi-error-r-cannot-be-added-to-gateway/

https://community.powerbi.com/t5/Power-Query/Refresh-R-Scripts-with-Personal-Gateway/m-p/445494#M17917

Has anyone found a solution to this or developed any suitable workarounds? e.g. can the Personal Gateway be used as an alternative or does the Enterprise Gateway support the running of Python Scripts?

I'm keen to hear of any strategies that people have found to running R scripts on the Power BI Service.

Brisbane Pom
  • 521
  • 7
  • 18

1 Answers1

5

You cannot use the enterprise gateway for R Scripts in Power Query. You can use the personal gateway, it will work on that, that is the current work around.

One client I have transforms the data on SQL Server using R Services module, then loads the data from there, that is one possible work around.

Jon
  • 4,593
  • 3
  • 13
  • 33
  • I feared that was probably the case, but thank you for confirming and offering a workaround. Does Microsoft have any official comment on this issue and an explanation as to why / list of recommended workarounds? They seem remarkably silent on the issue when I have done a Google search. – Brisbane Pom Sep 28 '19 at 06:15
  • Does this also apply to R Visuals, or are they permitted when running on the Enterprise Gateway? – Brisbane Pom Sep 28 '19 at 06:16
  • R visuals are OK, as long as the package is supported in the service. It is not on the current roadmap from what I know, and not a priority. – Jon Sep 28 '19 at 21:35
  • One more questions Jonee - when running an R script from the R Services module, does the data have to be returned to a table in SQL Server, or can it be served up as the result of a query? i.e. can i have a stored procedure that executes the R script that I can reference from Power BI and it returns data in the same way that any standard SQL query does? – Brisbane Pom Oct 14 '19 at 07:01
  • No it doesn't have to return it to a table, it can run r/python query in a stored proc, and return the results that way – Jon Oct 14 '19 at 07:32