Skip to main content

Query Configurations

Introduced or updated: v1.2.87

This page describes the Query node configurations available in the databend-query.toml configuration file.

  • Some parameters listed in the table below may not be present in databend-query.toml. If you require these parameters, you can manually add them to the file.

  • You can find sample configuration files on GitHub that set up Databend for various deployment environments. These files were created for internal testing ONLY. Please do NOT modify them for your own purposes. But if you have a similar deployment, it is a good idea to reference them when editing your own configuration files.

[query] Section

The following is a list of the parameters available within the [query] section:

ParameterDescription
max_active_sessionsMaximum number of active sessions.
wait_timeout_millsTimeout in milliseconds for waiting.
flight_api_addressIP address and port for listening to Databend-Query cluster shuffle data.
admin_api_addressAddress for the Admin REST API.
metric_api_addressAddress for the Metrics REST API.
mysql_handler_hostHostname for the MySQL query handler.
mysql_handler_portPort for the MySQL query handler.
clickhouse_http_handler_hostHostname for the ClickHouse HTTP query handler.
clickhouse_http_handler_portPort for the ClickHouse HTTP query handler.
http_handler_hostHostname for the HTTP API query handler.
http_handler_portPort for the HTTP API query handler.
flight_sql_handler_hostHostname for the Experimental Arrow Flight SQL API query handler.
flight_sql_handler_portPort for the Experimental Arrow Flight SQL API query handler.
tenant_idDefault tenant ID.
cluster_idDefault cluster ID.
table_engine_memory_enabledFlag to enable the Memory table engine.

[[query.users]] Section

The following is a list of the parameters available within the [[query.users]] section. For more information about configuring admin users, see Configuring Admin Users.

ParameterDescription
nameUser name.
auth_typeAuthentication type (e.g., no_password, double_sha1_password, sha256_password).
auth_stringAuthentication string (e.g., SHA-1 or SHA-256 hash of the password).

[log] Section

This section can include three subsections: [log.file], [log.stderr], and [log.query].

[log.file] Section

The following is a list of the parameters available within the [log.file] section:

ParameterDescription
onEnables or disables file logging. Defaults to true.
dirPath to store log files.
levelLog level: DEBUG, INFO, or ERROR. Defaults to INFO.
formatLog format: json or text. Defaults to json.

[log.stderr] Section

The following is a list of the parameters available within the [log.stderr] section:

ParameterDescription
onEnables or disables stderr logging. Defaults to false.
levelLog level: DEBUG, INFO, or ERROR. Defaults to DEBUG.
formatLog format: json or text. Defaults to text.

[log.query] Section

The following is a list of the parameters available within the [log.query] section:

ParameterDescription
onEnables logging query execution details to the query-details folder in the log directory. Defaults to on. Consider disabling when storage space is limited.

[meta] Section

The following is a list of the parameters available within the [meta] section:

ParameterDescription
usernameThe username used to connect to the Meta service. Default: "root".
passwordThe password used to connect to the Meta service. Databend recommends using the environment variable META_PASSWORD to provide the password. Default: "root".
endpointsSets one or more meta server endpoints that this query server can connect to. For robust connection to Meta, include multiple meta servers within the cluster as backups if possible. Example: ["192.168.0.1:9191", "192.168.0.2:9191"]. Default: ["0.0.0.0:9191"].
client_timeout_in_secondSets the wait time (in seconds) before terminating the attempt to connect to a meta server. Default: 60.
auto_sync_intervalSets how often (in seconds) this query server should automatically sync up endpoints from the meta servers within the cluster. When enabled, Databend-query contacts a Databend-meta server periodically to obtain a list of grpc_api_advertise_host:grpc-api-port. To disable the sync up, set it to 0. Default: 60.
unhealth_endpoint_evict_timeInternal time (in seconds) for not querying an unhealthy meta node endpoint. Default: 120.

[storage] Section

The following is a list of the parameters available within the [storage] section:

ParameterDescription
typeThe type of storage used. It can be one of the following: fs, s3, azblob, gcs, oss, cos, hdfs, webhdfs.

[storage.fs] Section

The following is a list of the parameters available within the [storage.fs] section:

ParameterDescription
data_pathThe path to the data storage location.

[storage.s3] Section

The following is a list of the parameters available within the [storage.s3] section:

ParameterDescription
bucketThe name of your Amazon S3-like storage bucket.
endpoint_urlThe URL endpoint for the S3-like storage service. Defaults to "https://s3.amazonaws.com".
access_key_idThe access key ID for authenticating with the storage service.
secret_access_keyThe secret access key for authenticating with the storage service.
enable_virtual_host_styleA boolean flag indicating whether to enable virtual host-style addressing.
allow_anonymousA boolean flag indicating whether anonymous access is allowed (true or false).
external_idExternal ID for authentication.
master_keyMaster key for authentication.
regionThe region for the S3-like storage service.
role_arnARN (Amazon Resource Name) for authentication.
rootThe root directory for HDFS.
security_tokenSecurity token for authentication.

[storage.azblob] Section

The following is a list of the parameters available within the [storage.azblob] section:

ParameterDescription
endpoint_urlThe URL endpoint for Azure Blob Storage (e.g., https://<your-storage-account-name>.blob.core.windows.net).
containerThe name of your Azure storage container.
account_nameThe name of your Azure storage account.
account_keyThe account key for authenticating with Azure Blob Storage.
rootThe root directory for Azure Blob Storage.

[storage.gcs] Section

The following is a list of the parameters available within the [storage.gcs] section:

ParameterDescription
bucketThe name of your Google Cloud Storage bucket.
endpoint_urlThe URL endpoint for Google Cloud Storage.
credentialThe credentials for authenticating with Google Cloud Storage.
rootThe root directory for Google Cloud Storage.

[storage.oss] Section

The following is a list of the parameters available within the [storage.oss] section:

ParameterDescription
bucketThe name of your Alibaba Cloud OSS bucket.
endpoint_urlThe URL endpoint for Alibaba Cloud OSS.
access_key_idThe access key ID for authenticating with Alibaba Cloud OSS.
access_key_secretThe access key secret for authenticating with Alibaba Cloud OSS.
presign_endpoint_urlThe URL endpoint for presigned operations with Alibaba Cloud OSS.
rootThe root directory for Alibaba Cloud OSS.

[storage.cos] Section

The following is a list of the parameters available within the [storage.cos] section:

ParameterDescription
bucketThe name of your Tencent Cloud Object Storage (COS) bucket.
endpoint_urlThe URL endpoint for Tencent COS (optional).
secret_idThe secret ID for authenticating with Tencent COS.
secret_keyThe secret key for authenticating with Tencent COS.
rootThe root directory for Tencent Cloud Object Storage.

[storage.hdfs] Section

The following is a list of the parameters available within the [storage.hdfs] section:

ParameterDescription
name_nodeThe name node address for Hadoop Distributed File System (HDFS).
rootThe root directory for HDFS.

[storage.webhdfs] Section

The following is a list of the parameters available within the [storage.webhdfs] section:

ParameterDescription
endpoint_urlThe URL endpoint for WebHDFS (Hadoop Distributed File System).
rootThe root directory for HDFS.
delegationDelegation token for authentication and authorization.

[cache] Section

The following is a list of the parameters available within the [cache] section:

ParameterDescription
data_cache_storageThe type of storage used for table data cache. Available options: "none" (disables table data cache), "disk" (enables disk cache). Defaults to "none".

[cache.disk] Section

The following is a list of the parameters available within the [cache.disk] section:

ParameterDescription
pathThe path where the cache is stored when using disk cache.
max_bytesThe maximum amount of cached data in bytes when using disk cache. Defaults to 21474836480 bytes (20 GB).