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.
Power BI Desktop fails to load more than 14999 rows using an R script.
This is the script I'm using:
library(RODBC) mycon<-odbcDriverConnect('driver={SQL Server};server=<servername>;database=<databasename>;trusted_connection=true') queryResult <-sqlQuery(mycon, "SELECT TOP 15000 <columns> FROM <view>") View(queryResult)
The script executes fine in Rstudio.
When I change the TOP 15000 into TOP 14999 the script works fine in Power BI Desktop.
Any ideas what this could be?
This is the error message:
DataFormat.Error: Unable to translate bytes [E9] at index 6 from specified code page to Unicode.
Solved! Go to Solution.
Thanks. I've managed to isolate the problem to a é character in an emailadres..
If I alter the view to replace that character it works for that row, but other rows give errors.
So I've added CONVERT(varchar,Emailadres) COLLATE Cyrillic_General_CI_AI and now it seems to work.
The big question remains: why does the query fail in Power BI Desktop while it runs fine in Rstudio?
The same script works on 15,000 rows (and more) for me. Can you track down what's in the 15000th row it's possible there's something odd in it (e.g. character data in what otherwise looks to be numeric data).
Thanks. I've managed to isolate the problem to a é character in an emailadres..
If I alter the view to replace that character it works for that row, but other rows give errors.
So I've added CONVERT(varchar,Emailadres) COLLATE Cyrillic_General_CI_AI and now it seems to work.
The big question remains: why does the query fail in Power BI Desktop while it runs fine in Rstudio?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |