R script in Power BI returns date as Microsoft.OleDb.Date

I am trying to convert a table to Power BI using function Run R Scriptin Edit Query. The source of the table is a csv file with a date column of the format "2017-01-04" (yyyy-mm-dd) :

enter image description here

Using Get Data, Power BI displays the same date column as this:

enter image description here

And after opening Edit Query windowthe same date column looks like this:

enter image description here

However, when you try to run R sctript with the same data, the column consists only of the "values" of Microsoft.OleDb.Date as follows:

enter image description here

R script I run simply:

# 'dataset' holds the input data for this script
output <- head(dataset)

If I try to change the data type, an en error is returned:

enter image description here

, Google. ?

+2
1

, .

Power BI : enter image description here

:

  • csv Edit Queries :

enter image description here

  1. R script

  2. , script .

+1

Source: https://habr.com/ru/post/1693671/


All Articles