mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-20 14:42:02 +00:00
1.2 KiB
1.2 KiB
odbc
Returns table that is connected via ODBC driver.
odbc(connection_settings, external_database, external_table)
Function Parameters
connection_settings
— Name of the section with connection settings in theodbc.ini
file.external_database
— Database in an external DBMS.external_table
— A name of the table inexternal_database
.
To implement ODBC connection, ClickHouse uses the separate program clickhouse-odbc-bridge
. ClickHouse starts this program automatically when it is required. The ODBC bridge program is installed by the same package with the ClickHouse server.
This function supports the Nullable data type (based on DDL of remote table that is queried).
Examples
select * from odbc('DSN=connection_settings_name', 'external_database_name', 'external_table_name')
Some examples of how to use external dictionaries through ODBC you can find in the ODBC section of external dictionaries configuration.