Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
smpa01
Community Champion
Community Champion

Running R script in service dataflow

Hi,

R execution fails in service while trying to create a dataflow unlike desktop.

Is it not possible at all to run R script to create a dataflow in service like desktop?

 

Thank you in advance.

 

Test Query _PQWRY

 

let
    
    X = R.Execute("Column1<-c(""red"",""blue"")#creating column1#(lf)Column2<-c(""green"",""white"")#creating column2#(lf)Column3<-c(""aqua"",""magenta"")#creating column2#(lf)df_1<-data.frame(Column1, Column2, Column3)"),
    df_1 = X{[Name="df_1"]}[Value]
in
    df_1

 

 

Test Query_Rscript

 

Column1<-c("red","blue")#creating column1
Column2<-c("green","white")#creating column2
Column3<-c("aqua","magenta")#creating column2
df_1<-data.frame(Column1, Column2, Column3)

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
2 REPLIES 2
lbendlin
Super User
Super User

R and Python scripts require the use of a personal gateway.  Not sure if you can do that with dataflows.

smpa01
Community Champion
Community Champion

@lbendlin thanks for your reply. Don't think it is possible to run R script in DF currently. The r terminal is missing in DF.

 

I guess R runs on desktop as it can see the R Studio IDE on the local machine which it can't on DF.

The only way I assume it can be run on DF through running R on SQL server connection. R can be run on a SQL server DB table through SQL server ML services. 

 

I did not do the testing but I guess it would work out. The only downside is that R can only be run on SQL tables and not on anyother data source.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.