mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #2757 from alesapin/master
Add <yandex> tag in PostgreSQL external dictionary config
This commit is contained in:
commit
93f1ec2f02
@ -156,34 +156,36 @@ Configuring `/etc/odbc.ini` (or `~/.odbc.ini`):
|
||||
The dictionary configuration in ClickHouse:
|
||||
|
||||
```xml
|
||||
<dictionary>
|
||||
<name>table_name</name>
|
||||
<source>
|
||||
<odbc>
|
||||
<!-- You can specifiy the following parameters in connection_string: -->
|
||||
<!-- DSN=myconnection;UID=username;PWD=password;HOST=127.0.0.1;PORT=5432;DATABASE=my_db -->
|
||||
<connection_string>DSN=myconnection</connection_string>
|
||||
<table>postgresql_table</table>
|
||||
</odbc>
|
||||
</source>
|
||||
<lifetime>
|
||||
<min>300</min>
|
||||
<max>360</max>
|
||||
</lifetime>
|
||||
<layout>
|
||||
<hashed/>
|
||||
</layout>
|
||||
<structure>
|
||||
<id>
|
||||
<name>id</name>
|
||||
</id>
|
||||
<attribute>
|
||||
<name>some_column</name>
|
||||
<type>UInt64</type>
|
||||
<null_value>0</null_value>
|
||||
</attribute>
|
||||
</structure>
|
||||
</dictionary>
|
||||
<yandex>
|
||||
<dictionary>
|
||||
<name>table_name</name>
|
||||
<source>
|
||||
<odbc>
|
||||
<!-- You can specifiy the following parameters in connection_string: -->
|
||||
<!-- DSN=myconnection;UID=username;PWD=password;HOST=127.0.0.1;PORT=5432;DATABASE=my_db -->
|
||||
<connection_string>DSN=myconnection</connection_string>
|
||||
<table>postgresql_table</table>
|
||||
</odbc>
|
||||
</source>
|
||||
<lifetime>
|
||||
<min>300</min>
|
||||
<max>360</max>
|
||||
</lifetime>
|
||||
<layout>
|
||||
<hashed/>
|
||||
</layout>
|
||||
<structure>
|
||||
<id>
|
||||
<name>id</name>
|
||||
</id>
|
||||
<attribute>
|
||||
<name>some_column</name>
|
||||
<type>UInt64</type>
|
||||
<null_value>0</null_value>
|
||||
</attribute>
|
||||
</structure>
|
||||
</dictionary>
|
||||
</yandex>
|
||||
```
|
||||
|
||||
You may need to edit `odbc.ini` to specify the full path to the library with the driver `DRIVER=/usr/local/lib/psqlodbcw.so`.
|
||||
|
@ -156,34 +156,36 @@
|
||||
Конфигурация словаря в ClickHouse:
|
||||
|
||||
```xml
|
||||
<dictionary>
|
||||
<name>table_name</name>
|
||||
<source>
|
||||
<odbc>
|
||||
<!-- в connection_string можно указывать следующие параметры: -->
|
||||
<!-- DSN=myconnection;UID=username;PWD=password;HOST=127.0.0.1;PORT=5432;DATABASE=my_db -->
|
||||
<connection_string>DSN=myconnection</connection_string>
|
||||
<table>postgresql_table</table>
|
||||
</odbc>
|
||||
</source>
|
||||
<lifetime>
|
||||
<min>300</min>
|
||||
<max>360</max>
|
||||
</lifetime>
|
||||
<layout>
|
||||
<hashed/>
|
||||
</layout>
|
||||
<structure>
|
||||
<id>
|
||||
<name>id</name>
|
||||
</id>
|
||||
<attribute>
|
||||
<name>some_column</name>
|
||||
<type>UInt64</type>
|
||||
<null_value>0</null_value>
|
||||
</attribute>
|
||||
</structure>
|
||||
</dictionary>
|
||||
<yandex>
|
||||
<dictionary>
|
||||
<name>table_name</name>
|
||||
<source>
|
||||
<odbc>
|
||||
<!-- в connection_string можно указывать следующие параметры: -->
|
||||
<!-- DSN=myconnection;UID=username;PWD=password;HOST=127.0.0.1;PORT=5432;DATABASE=my_db -->
|
||||
<connection_string>DSN=myconnection</connection_string>
|
||||
<table>postgresql_table</table>
|
||||
</odbc>
|
||||
</source>
|
||||
<lifetime>
|
||||
<min>300</min>
|
||||
<max>360</max>
|
||||
</lifetime>
|
||||
<layout>
|
||||
<hashed/>
|
||||
</layout>
|
||||
<structure>
|
||||
<id>
|
||||
<name>id</name>
|
||||
</id>
|
||||
<attribute>
|
||||
<name>some_column</name>
|
||||
<type>UInt64</type>
|
||||
<null_value>0</null_value>
|
||||
</attribute>
|
||||
</structure>
|
||||
</dictionary>
|
||||
</yandex>
|
||||
```
|
||||
|
||||
Может понадобиться в `odbc.ini` указать полный путь до библиотеки с драйвером `DRIVER=/usr/local/lib/psqlodbcw.so`.
|
||||
|
Loading…
Reference in New Issue
Block a user