query_service_config
The query_service_config section describes the parameters for YDB to work with external data sources using federated queries.
If access to the required source requires deploying a connector, it must also be configured according to the instructions.
Parameter description
|
Parameter |
Default value |
Description |
|
|
|
Connector host name. |
|
|
|
Connector TCP port. |
|
|
|
Whether to use connection encryption. When the connector and YDB dynamic node are deployed on the same server, encrypted connection between them is not required, but it can be enabled if needed. |
|
|
empty string |
Path to the CA certificate used for encryption. |
|
|
|
Enables predicate pushdown to external data sources: some parts of SQL queries (for example, filters) will be passed for execution to the external source. This can significantly reduce the volume of data transferred over the network from the data source to federated YDB, save its computational resources, and significantly reduce federated query processing time. |
|
|
empty list |
List of allowed external data source types. Applied when Possible values:
|
|
|
|
Enable all external data source types. When enabled, the |
Examples
Enabling ClickHouse and MySQL external sources
query_service_config:
generic:
connector:
endpoint:
host: localhost # host name where the connector is deployed
port: 2130 # connector port number
use_ssl: false # flag to enable connection encryption
ssl_ca_crt: "/opt/ydb/certs/ca.crt" # path to CA certificate
default_settings:
- name: UsePredicatePushdown
value: "true"
all_external_data_sources_are_available: false
available_external_data_sources:
- ClickHouse
- MySQL
Enabling all external data source types
query_service_config:
generic:
connector:
endpoint:
host: localhost # host name where the connector is deployed
port: 2130 # connector port number
use_ssl: false # flag to enable connection encryption
ssl_ca_crt: "/opt/ydb/certs/ca.crt" # path to CA certificate
default_settings:
- name: UsePredicatePushdown
value: "true"
all_external_data_sources_are_available: true