【问题标题】:Error connecting while the pSQL from clickhouse从 clickhouse 连接 pSQL 时出错
【发布时间】:2020-05-04 16:43:24
【问题描述】:

我有 ~/.odbc.ini

[DEFAULT]
Driver = myconnection

[myconnection]
Description         = PostgreSQL connection to my_db
Driver              = PostgreSQL Unicode
Database            = staging-**-db
Servername          = **.**.**.**
UserName            = staging-**-user
Password            = ******
Port                = 5432
Protocol            = 11
ReadOnly            = No
RowVersioning       = No
ShowSystemTables    = No
ConnSettings        =

我正在尝试制作一本字典

CREATE DICTIONARY psql_temp4
(
    id UInt64,
    app String,
    name String
)
PRIMARY KEY id
SOURCE(ODBC(CONNECTION_STRING 'DSN=myconnection' TABLE 'django_migrations_copy'))
LIFETIME(MIN 300 MAX 360)
LAYOUT(HASHED())

我得到的错误是

ode: 86, e.displayText() = DB::Exception: Received error from remote server /identifier_quote?connection_string=DSN%3Dmyconnection. HTTP status code: 500 Internal Server Error, body: Error getting identifier quote style from ODBC 'Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = Connection attempt failed: Connection:Not applicable
Server:Not applicable
===========================
ODBC Diagnostic record #1:
===========================
SQLSTATE = IM002
Native Error Code = 0
[unixODBC][Driver Manager]Data source name not found, and no default driver specified

操作系统版本 猫 /etc/os-release 名称="Ubuntu" VERSION="16.04.6 LTS (Xenial Xerus)"

可能是什么原因?

【问题讨论】:

  • 你应该找到postgresql ODBC文件的.so文件并添加DRIVER = /full/path/to/portres/odbc/driver.so

标签: postgresql odbc clickhouse


【解决方案1】:

Ch 需要驱动程序的完整路径

/etc/odbc.ini 
[mysqlconn] 
DRIVER = /usr/local/lib/libmyodbc5w.so

https://clickhouse.yandex/docs/en/operations/table_engines/odbc/

【讨论】:

    猜你喜欢
    • 2017-07-22
    • 2021-09-26
    • 2019-06-22
    • 1970-01-01
    • 2012-03-03
    • 1970-01-01
    • 1970-01-01
    • 2013-11-22
    • 2017-09-24
    相关资源
    最近更新 更多