Ошибка подключения при pSQL от clickhouse - PullRequest
0 голосов
/ 04 мая 2020

У меня ~ / .odb c .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

Версия ОС cat / etc / os-release NAME = "Ubuntu" VERSION = "16.04.6 LTS (Xenial Xerus)"

В чем может быть причина?

1 Ответ

0 голосов
/ 04 мая 2020

Ч. нужен полный путь к драйверу

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

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

...