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
DataMiner
New Member

R Script connect to SQL Server

I have a Power BI report which gets data from a R Script. My R script connects to a SQL server, does data transformations and then returns a data frame. So in essence, can an R script connect to a SQL server from inside Power BI? The library I've been using in R to connect to the SQL server is RODBC.

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@DataMiner,

 

Yes, you may refer to the post below.

https://community.powerbi.com/t5/Desktop/R-script-fails-to-load-more-than-14999-rows/td-p/16146

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@DataMiner,

 

Yes, you may refer to the post below.

https://community.powerbi.com/t5/Desktop/R-script-fails-to-load-more-than-14999-rows/td-p/16146

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
DataMiner
New Member

I have a Power BI report and I want to use an R Script as my data source. My R script connects to a SQL server and does data transformations and returns a data frame. Is it possible for Power BI to use my R script. In essence, can Power BI get data from a R script which connects to a SQL server?

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.