Truncation of database name and columns while connecting to SQL database from R

一世执手 提交于 2020-01-06 05:57:09

问题


I am on macOS Catalina (Version 10.15.1), running R 3.5.0. I am running SQL server on Docker locally. For connecting to the server, I am using odbc:

con <- dbConnect(odbc(), 
                   Driver = "Simba SQL Server ODBC Driver", 
                   Server = "localhost", 
                   UID = 'SA',
                   PWD  = 'XXXXXXXX',
                   database = dbname)

I am able to connect to the server, however the names of all the databases therein are getting truncated to just the first letter as shown here:

Subsequently all the character columns are also showing only the first letter.

I had a look at this, but just can't figure out why this is happening. For starters, the names of the databases itself, as shown in the RStudio Connections pane, are getting truncated.

I am able to connect to the databases using Azure Data Studio and see all the columns correctly.


回答1:


I had a look at this and turns out this was exactly what I was facing. Followed the steps mentioned here to resolve the issue.



来源:https://stackoverflow.com/questions/58777915/truncation-of-database-name-and-columns-while-connecting-to-sql-database-from-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!