0

can you help me?

DataSource.Error: ADO.NET: A problem occurred while processing your R script.

Here are the technical details: Information about a data source is required.

Details:

DataSourceKind = R

DataSourcePath = R

Message = A problem occurred while processing your R script.

Here are the technical details: Information about a data source is required.

ErrorCode = -2147467259

ExceptionType = Microsoft.PowerBI.Scripting.R.Exceptions.RUnexpectedException

This error comes up when I try to export my table using an R script

write.csv2(dataset, file = paste0("C:/Users/Acer/OneDrive/ALLPARTS/ALLPARTSNET_", format(Sys.time(), "%Y%m%d"), ".csv"), row.names=F)

Already tried:

  • reinstall R, R Studio and Power BI

Is there a solution?

LINK POWER BI FILE

https://1drv.ms/u/s!AnziDWh5m2I1gplLfe9FM2M0EFqDyw

Lucas Guidi
  • 65
  • 1
  • 10
  • PowerBI and R have recognise date time data differently (https://stackoverflow.com/questions/41823277/r-script-in-power-bi-returns-date-as-microsoft-oledb-date). PowerBI uses Microsoft.OleDb.Date which R doesnt recognise and PowerBI doesnt recognise R's version. Previously I've converted datetime data to a string to get over this not not sure what to do in this case except switch to Query to automate the csv export – NColl Oct 06 '20 at 16:10

2 Answers2

0
  1. Click on File > Options & settings > Options.
  2. Inside the Options window, you can change the Privacy in the Global or in the Current File section. Click on Privacy.
  3. Select “Ignore the Privacy Levels and potentially improve performance”.

RUN SCRIPT AGAIN!

Lucas Guidi
  • 65
  • 1
  • 10
0

Power BI often changes the data type upon importing data into Power BI, and this conflicts with how R interprets that data. In my specific case, the error I was getting was the exact same as yours

I fixed this by removing the Applied Step where Power BI changed the data type of all of my columns. It instantly fixed my issue.

user18139
  • 188
  • 1
  • 3
  • 13