Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I'm trying to run an R script in Power BI which connects to multiple sources and then runs a GLM to return predictions in a new dataframe. Im struggling with debugging some of the errors im getting.
The latest one is "Error in sqlQuery - first argument is not an open RODBC channel"
I have connected to the server initially in script:
con <- DBI::dbConnect(odbc::odbc(),
Driver = "{MySQL ODBC 8.0 ANSI Driver}",
Server = "server name",
UID ="username",
Database = "database",
PWD = "password",
Port = 3306)
I have then used the following at the start of the SQL query:
dataframe_name <- sqlQuery (con,
"SELECT.....
Any ideas why im getting this error?
Thanks
Update: ive now got the above working by moving to dbGetQuery, which is working for my first query. However the second query is giving me the error "Unable to translate bytes [A3] at index -1 from specified code page to Unicode." I've had a look online and cant see much for this error, any ideas?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 36 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 73 | |
| 73 | |
| 38 | |
| 35 | |
| 26 |