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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rikBI
Helper I
Helper I

Auto refresh R source

Hi All,

 

We are building a powerBI dashboard with R code that gets its data from an online service. This needs to be refreshed on an hourly basis. Powerbi can't refesh this source without the powerBI gateway according to the message on powerbi. Is there a workaround, since we don't need a gateway to on premise for online data?

 

 

1 ACCEPTED SOLUTION

Hi @rikBI,

I am afraid that you are not able to properly refresh R source without installing  personal gateway. According to the article, gateway is an essential requirement in order to set schedule refresh for R dataset.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
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

9 REPLIES 9
simontaylor
Employee
Employee

Is there any change 6 years later?

ankitpatira
Community Champion
Community Champion

@rikBI It is asking for gateway because R script gets executed against your local R server which will go to your online data source. If you absolutely can't install gateway then use Web connector to get data from online source within power bi desktop and it will refresh without needing gateway.

Hi Ankit,

 

Thank you for your suggestion. We tried that as well, but we need the R script to dynamically generate the URL.

 

Hi @rikBI,

I am afraid that you are not able to properly refresh R source without installing  personal gateway. According to the article, gateway is an essential requirement in order to set schedule refresh for R dataset.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Ah yes, according to the documentation, you need to use a gateway to refresh R. Might want to post this to Ideas if it is not already out there.

 

https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-r-in-query-editor/

 

 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Again On Power Bi I paste the same code:

 

DataSource.Error: ADO.NET: R script error.
Loading required package: methods
Warning message:
package 'mice' was built under R version 3.3.3
Error in mice(Orders_Basket_Table_1, m = 1, maxit = 50, meth = "pmm", :
object 'Orders_Basket_Table_1' not found
Execution halted

Details:
DataSourceKind=R

 

 

Note: Orders_Basket_Table_1 is the name of the dataset and it is surely available.

 

++++++++++++++++++

 

I tried as mentioned in the link:

 

DataSource.Error: ADO.NET: R script error.
Loading required package: methods
Warning message:
package 'mice' was built under R version 3.3.3
Error in `[.data.frame`(data, , jj) : undefined columns selected
Calls: mice -> sampler -> is.factor -> [ -> [.data.frame
Execution halted

Details:
DataSourceKind=R

 

Both of them not work ?!  

 

 

@MAAbdullah47 

 

You can use Power Update to auto refresh your Power BI File Containing R script and schedule it to auto publish to PowerBI.com. It does not require gateway set up and works with minimal set up. It is also free for certain no of tasks.

 

Download from 

www.PowerOnBI.com

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

Thank You, I tested it in R studio it gives the following error:

 

> tempData <- mice(dataset,m=1,maxit=50,meth='pmm',seed=100)
Error in mice(dataset, m = 1, maxit = 50, meth = "pmm", seed = 100) :
No missing values found

 

Not sure if the same thing might happen in Power Bi or not?

Greg_Deckler
Super User
Super User

So, you write an R query or you put an R step in a query?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors