Forum Discussion
Refresh Google Sheets in Power BI
- Anonymous8 years ago
Anonymous,
You can use Function.InvokeAfter() function to set wait time between calls in Power Query.
Alternatively, you can use R script to refresh Google sheets and set Sys.sleep(30) as described in the following similar thread.
https://community.powerbi.com/t5/Desktop/HTTP-429-Error-while-refreshing-data-from-Google-Sheets-using-R/td-p/264416
Regards,
Lydia
Anonymous,
You can use Function.InvokeAfter() function to set wait time between calls in Power Query.
Alternatively, you can use R script to refresh Google sheets and set Sys.sleep(30) as described in the following similar thread.
https://community.powerbi.com/t5/Desktop/HTTP-429-Error-while-refreshing-data-from-Google-Sheets-using-R/td-p/264416
Regards,
Lydia
I tried Sys.Sleep(5) in R script, But each sheet executes reading of Google Sheet and Access to Google API when I Refresh All.
When I try to get ALL sheets at once, gs_download() is executed as many number of times as the number of sheets and the Sys.Sleep(5) is executed as many times as the number of sheets, but the READ begins for ALL sheets at the same time, thus the error...
Sys.Sleep(30)
library(googlesheets)
suppressMessages(gs_auth(token = "~/person.rds", verbose = FALSE))
temp <- tempfile(fileext = ".xlsx")
gs_download(gs_key("1k20...1xds"), to=temp, overwrite=TRUE)
require(xlsx)
x1 <- read.xlsx(temp, sheet = 1)