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.

Error with R Script (transform) : DataSource.Error / Error in type.convert

I have a dataset build from a CSV file and I add a R Script transformation step to perform some regex.

I get that error : 

 

 

DataSource.Error : ADO.NET : Erreur du script R.
Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, numerals = numerals, :
entrée incorrecte 'Vengeance ! 😛' dans 'utf8towcs'
Calls: read.csv -> read.table -> type.convert
Exécution arrêtée

Détails :
DataSourceKind=R
DataSourcePath=R
Message=Erreur du script R.
Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, numerals = numerals, :
entrée incorrecte 'Vengeance ! 😛' dans 'utf8towcs'
Calls: read.csv -> read.table -> type.convert
Exécution arrêtée

ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Radio.RScriptRuntimeException

Text contains a special character (a smiley : Smiley Tongue) that appears correctly in Power BI.

I tried different encoding with the same result.

 

R Code : 

output <- str_match_all(dataset$body, "\\[Tag:(?<tagid>[0-9]+):(?<tagname>[a-zA-Z]+)\\]")

 

Is it a bug or may I missed something ?

 

JP

Status: Needs Info
Comments
v-qiuyu-msft
Community Support

Hi @djeepy1,

 

Would you please share the sample CSV and PBIX file with us? The provided R code has special characters which is not very clear. 

 

Best Regards,
Qiuyun Yu 

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
djeepy1
Advocate I

Note : Special character in R code is due to HTML Editor in that forum.

Please find PBIX and sample files here : https://1drv.ms/f/s!AvEY-g3vLy-b0NhJ4jphfklYNNic5g

(I do not find a way to attach files in a post here)

 

You will find a source file that work (ie. no smiley inside) and another file that do not work (with a smiley).

R code is complete in PBIX.

 

 

 

djeepy1
Advocate I

No news from that issue ?

Is it possible to escalate it ?