r script
5 TopicsPersonal Gateway for R script
Hi there, I have used an R script in my BI Dashboard, published it and set an auto refresh with a personal gateway. The personal gateway is on and ready to use, the auto refresh works with no error but the column that refrences the R code does not show the correct data. The column is meant to show Trues and falses but it only shows False. When I refresh in desktop it works perfectly and the column displays the correct info. I think I am missing something in the personal gateway or in the actual R code but I have read everything I can find on this and just can't seem to get it right. I am new to using R in BI so the whole process has been trial and error but it is just odd that it works in desktop but not service. The R code is used as a step in one of my tables in query editor, this is how it starts off: new_dataset <- dataset new_data <- data.frame(new_dataset) HS <- new_data$"US_HTS_Code__c" COO <- new_data$"Country_of_Origin2__c" new_data$ADDFlag1 <- Any guidance will be greatly appreciated, thanks so much!1.5KViews0likes4CommentsScheduled refresh of SQL source but with R script transformstions
Hello. I am exploring using PBIRS as the server to host Power BI reports, which will extract/source data from a SQL Server Database, and which will subsequently use R scripts to transform the data in various ways. Per the link below, as far as I understand R scripts themselves are not a source which can have PBIRS scheduled refreshes applied to them. As such, I'm wondering the following: 1.) Is there a way to work around this so that I can in fact schedule refreshes of a single R script which will hold the code for the entire ETL, 2.) If SQL Server Database is the source and transformations are applied using R scripts, does scheduled refresh work in this scenario? https://docs.microsoft.com/en-us/power-bi/report-server/data-sources#list-of-supported-authentication-methods-for-model-refresh887Views0likes1CommentR Script in direct query
I am using R Script in Direct Query to retrieve data from SQL server using SP by passing logged-in user id. In Power Query Editor window, the script runs fine and retrieves data. But on applying changes to the report, it is throwing below error: Microsoft SQL: Incorrect syntax near the keyword 'EXEC'. Incorrect syntax near ')'. Sample code: let RScript = R.Execute("output <- read.table(text=system2(""whoami"", stdout=TRUE))"), output = Record.FieldValues(RScript{[Name="output"]}[Value]{0}){0}, Source = Sql.Database("SQLServerName", "DBName", [Query="EXEC SP_Name '"&output&"'"]) in Source2KViews0likes3CommentsPower BI - R Script to Get Data - Schedule a Refresh
Hello - I have a Power BI report and I'm using an R query to Get Data. Now I'm trying to schedule a refresh. My Personal Gateway is all set up and I have data sources successfully added to it for other reports that use a SQL Server Data Source Type. Since my source is not excel or a CSV that runs an R Script, and the Source is the R script in itself, how do I add a datasource that corresponds with an R script? Which Data Source Type do I need to add and what are the steps to get this Data Source added so I can schedule a refresh for the data? Thank you.639Views0likes0CommentsUsing R to get data, schedule refresh/add data source
Hello - I have a Power BI report and I'm using an R query to Get Data. Now I'm trying to schedule a refresh. My Personal Gateway is all set up and I have data sources successfully added to it for other reports that use a SQL Server Data Source Type. Since my source is not excel or a CSV that runs an R Script, and the Source is the R script in itself, how do I add a datasource that corresponds with an R script? Which Data Source Type do I need to add and what are the steps to get this Data Source added so I can schedule a refresh for the data? Thank you.724Views1like0Comments