Managed Service for ClickHouse API, gRPC: UserService.GrantPermission
Grants a permission to the specified ClickHouse user.
gRPC request
rpc GrantPermission (GrantUserPermissionRequest) returns (operation.Operation)
GrantUserPermissionRequest
{
"clusterId": "string",
"userName": "string",
"permission": {
"databaseName": "string"
}
}
Field |
Description |
clusterId |
string Required field. ID of the ClickHouse cluster the user belongs to. |
userName |
string Required field. Name of the user to grant the permission to. |
permission |
Permission that should be granted to the specified user. |
Permission
Field |
Description |
databaseName |
string Name of the database that the permission grants access to. |
operation.Operation
{
"id": "string",
"description": "string",
"createdAt": "google.protobuf.Timestamp",
"createdBy": "string",
"modifiedAt": "google.protobuf.Timestamp",
"done": "bool",
"metadata": {
"clusterId": "string",
"userName": "string"
},
// Includes only one of the fields `error`, `response`
"error": "google.rpc.Status",
"response": {
"name": "string",
"clusterId": "string",
"permissions": [
{
"databaseName": "string"
}
],
"settings": {
"readonly": "google.protobuf.Int64Value",
"allowDdl": "google.protobuf.BoolValue",
"allowIntrospectionFunctions": "google.protobuf.BoolValue",
"connectTimeout": "google.protobuf.Int64Value",
"connectTimeoutWithFailover": "google.protobuf.Int64Value",
"receiveTimeout": "google.protobuf.Int64Value",
"sendTimeout": "google.protobuf.Int64Value",
"timeoutBeforeCheckingExecutionSpeed": "google.protobuf.Int64Value",
"insertQuorum": "google.protobuf.Int64Value",
"insertQuorumTimeout": "google.protobuf.Int64Value",
"insertQuorumParallel": "google.protobuf.BoolValue",
"insertNullAsDefault": "google.protobuf.BoolValue",
"selectSequentialConsistency": "google.protobuf.BoolValue",
"deduplicateBlocksInDependentMaterializedViews": "google.protobuf.BoolValue",
"replicationAlterPartitionsSync": "google.protobuf.Int64Value",
"maxReplicaDelayForDistributedQueries": "google.protobuf.Int64Value",
"fallbackToStaleReplicasForDistributedQueries": "google.protobuf.BoolValue",
"distributedProductMode": "DistributedProductMode",
"distributedAggregationMemoryEfficient": "google.protobuf.BoolValue",
"distributedDdlTaskTimeout": "google.protobuf.Int64Value",
"skipUnavailableShards": "google.protobuf.BoolValue",
"compileExpressions": "google.protobuf.BoolValue",
"minCountToCompileExpression": "google.protobuf.Int64Value",
"maxBlockSize": "google.protobuf.Int64Value",
"minInsertBlockSizeRows": "google.protobuf.Int64Value",
"minInsertBlockSizeBytes": "google.protobuf.Int64Value",
"maxInsertBlockSize": "google.protobuf.Int64Value",
"minBytesToUseDirectIo": "google.protobuf.Int64Value",
"useUncompressedCache": "google.protobuf.BoolValue",
"mergeTreeMaxRowsToUseCache": "google.protobuf.Int64Value",
"mergeTreeMaxBytesToUseCache": "google.protobuf.Int64Value",
"mergeTreeMinRowsForConcurrentRead": "google.protobuf.Int64Value",
"mergeTreeMinBytesForConcurrentRead": "google.protobuf.Int64Value",
"maxBytesBeforeExternalGroupBy": "google.protobuf.Int64Value",
"maxBytesBeforeExternalSort": "google.protobuf.Int64Value",
"groupByTwoLevelThreshold": "google.protobuf.Int64Value",
"groupByTwoLevelThresholdBytes": "google.protobuf.Int64Value",
"priority": "google.protobuf.Int64Value",
"maxThreads": "google.protobuf.Int64Value",
"maxMemoryUsage": "google.protobuf.Int64Value",
"maxMemoryUsageForUser": "google.protobuf.Int64Value",
"maxNetworkBandwidth": "google.protobuf.Int64Value",
"maxNetworkBandwidthForUser": "google.protobuf.Int64Value",
"maxPartitionsPerInsertBlock": "google.protobuf.Int64Value",
"maxConcurrentQueriesForUser": "google.protobuf.Int64Value",
"forceIndexByDate": "google.protobuf.BoolValue",
"forcePrimaryKey": "google.protobuf.BoolValue",
"maxRowsToRead": "google.protobuf.Int64Value",
"maxBytesToRead": "google.protobuf.Int64Value",
"readOverflowMode": "OverflowMode",
"maxRowsToGroupBy": "google.protobuf.Int64Value",
"groupByOverflowMode": "GroupByOverflowMode",
"maxRowsToSort": "google.protobuf.Int64Value",
"maxBytesToSort": "google.protobuf.Int64Value",
"sortOverflowMode": "OverflowMode",
"maxResultRows": "google.protobuf.Int64Value",
"maxResultBytes": "google.protobuf.Int64Value",
"resultOverflowMode": "OverflowMode",
"maxRowsInDistinct": "google.protobuf.Int64Value",
"maxBytesInDistinct": "google.protobuf.Int64Value",
"distinctOverflowMode": "OverflowMode",
"maxRowsToTransfer": "google.protobuf.Int64Value",
"maxBytesToTransfer": "google.protobuf.Int64Value",
"transferOverflowMode": "OverflowMode",
"maxExecutionTime": "google.protobuf.Int64Value",
"timeoutOverflowMode": "OverflowMode",
"maxRowsInSet": "google.protobuf.Int64Value",
"maxBytesInSet": "google.protobuf.Int64Value",
"setOverflowMode": "OverflowMode",
"maxRowsInJoin": "google.protobuf.Int64Value",
"maxBytesInJoin": "google.protobuf.Int64Value",
"joinOverflowMode": "OverflowMode",
"joinAlgorithm": [
"JoinAlgorithm"
],
"anyJoinDistinctRightTableKeys": "google.protobuf.BoolValue",
"maxColumnsToRead": "google.protobuf.Int64Value",
"maxTemporaryColumns": "google.protobuf.Int64Value",
"maxTemporaryNonConstColumns": "google.protobuf.Int64Value",
"maxQuerySize": "google.protobuf.Int64Value",
"maxAstDepth": "google.protobuf.Int64Value",
"maxAstElements": "google.protobuf.Int64Value",
"maxExpandedAstElements": "google.protobuf.Int64Value",
"minExecutionSpeed": "google.protobuf.Int64Value",
"minExecutionSpeedBytes": "google.protobuf.Int64Value",
"countDistinctImplementation": "CountDistinctImplementation",
"inputFormatValuesInterpretExpressions": "google.protobuf.BoolValue",
"inputFormatDefaultsForOmittedFields": "google.protobuf.BoolValue",
"inputFormatNullAsDefault": "google.protobuf.BoolValue",
"dateTimeInputFormat": "DateTimeInputFormat",
"inputFormatWithNamesUseHeader": "google.protobuf.BoolValue",
"outputFormatJsonQuote_64bitIntegers": "google.protobuf.BoolValue",
"outputFormatJsonQuoteDenormals": "google.protobuf.BoolValue",
"dateTimeOutputFormat": "DateTimeOutputFormat",
"lowCardinalityAllowInNativeFormat": "google.protobuf.BoolValue",
"allowSuspiciousLowCardinalityTypes": "google.protobuf.BoolValue",
"emptyResultForAggregationByEmptySet": "google.protobuf.BoolValue",
"httpConnectionTimeout": "google.protobuf.Int64Value",
"httpReceiveTimeout": "google.protobuf.Int64Value",
"httpSendTimeout": "google.protobuf.Int64Value",
"enableHttpCompression": "google.protobuf.BoolValue",
"sendProgressInHttpHeaders": "google.protobuf.BoolValue",
"httpHeadersProgressInterval": "google.protobuf.Int64Value",
"addHttpCorsHeader": "google.protobuf.BoolValue",
"cancelHttpReadonlyQueriesOnClientClose": "google.protobuf.BoolValue",
"maxHttpGetRedirects": "google.protobuf.Int64Value",
"joinedSubqueryRequiresAlias": "google.protobuf.BoolValue",
"joinUseNulls": "google.protobuf.BoolValue",
"transformNullIn": "google.protobuf.BoolValue",
"quotaMode": "QuotaMode",
"flattenNested": "google.protobuf.BoolValue",
"formatRegexp": "string",
"formatRegexpEscapingRule": "FormatRegexpEscapingRule",
"formatRegexpSkipUnmatched": "google.protobuf.BoolValue",
"asyncInsert": "google.protobuf.BoolValue",
"asyncInsertThreads": "google.protobuf.Int64Value",
"waitForAsyncInsert": "google.protobuf.BoolValue",
"waitForAsyncInsertTimeout": "google.protobuf.Int64Value",
"asyncInsertMaxDataSize": "google.protobuf.Int64Value",
"asyncInsertBusyTimeout": "google.protobuf.Int64Value",
"asyncInsertStaleTimeout": "google.protobuf.Int64Value",
"memoryProfilerStep": "google.protobuf.Int64Value",
"memoryProfilerSampleProbability": "google.protobuf.DoubleValue",
"maxFinalThreads": "google.protobuf.Int64Value",
"inputFormatParallelParsing": "google.protobuf.BoolValue",
"inputFormatImportNestedJson": "google.protobuf.BoolValue",
"localFilesystemReadMethod": "LocalFilesystemReadMethod",
"maxReadBufferSize": "google.protobuf.Int64Value",
"insertKeeperMaxRetries": "google.protobuf.Int64Value",
"maxTemporaryDataOnDiskSizeForUser": "google.protobuf.Int64Value",
"maxTemporaryDataOnDiskSizeForQuery": "google.protobuf.Int64Value",
"maxParserDepth": "google.protobuf.Int64Value",
"remoteFilesystemReadMethod": "RemoteFilesystemReadMethod",
"memoryOvercommitRatioDenominator": "google.protobuf.Int64Value",
"memoryOvercommitRatioDenominatorForUser": "google.protobuf.Int64Value",
"memoryUsageOvercommitMaxWaitMicroseconds": "google.protobuf.Int64Value",
"logQueryThreads": "google.protobuf.BoolValue",
"maxInsertThreads": "google.protobuf.Int64Value",
"useHedgedRequests": "google.protobuf.BoolValue",
"idleConnectionTimeout": "google.protobuf.Int64Value",
"hedgedConnectionTimeoutMs": "google.protobuf.Int64Value",
"loadBalancing": "LoadBalancing",
"preferLocalhostReplica": "google.protobuf.BoolValue",
"compile": "google.protobuf.BoolValue",
"minCountToCompile": "google.protobuf.Int64Value"
},
"quotas": [
{
"intervalDuration": "google.protobuf.Int64Value",
"queries": "google.protobuf.Int64Value",
"errors": "google.protobuf.Int64Value",
"resultRows": "google.protobuf.Int64Value",
"readRows": "google.protobuf.Int64Value",
"executionTime": "google.protobuf.Int64Value"
}
]
}
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
Field |
Description |
id |
string ID of the operation. |
description |
string Description of the operation. 0-256 characters long. |
createdAt |
Creation timestamp. |
createdBy |
string ID of the user or service account who initiated the operation. |
modifiedAt |
The time when the Operation resource was last modified. |
done |
bool If the value is |
metadata |
Service-specific metadata associated with the operation. |
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
response |
The normal response of the operation in case of success. Includes only one of the fields The operation result. |
GrantUserPermissionMetadata
Field |
Description |
clusterId |
string ID of the ClickHouse cluster the user belongs to. |
userName |
string Name of the user that is being granted a permission. |
User
A ClickHouse User resource. For more information, see
the Developer's guide.
Field |
Description |
name |
string Name of the ClickHouse user. |
clusterId |
string ID of the ClickHouse cluster the user belongs to. |
permissions[] |
Set of permissions granted to the user. |
settings |
|
quotas[] |
Set of quotas assigned to the user. |
Permission
Field |
Description |
databaseName |
string Name of the database that the permission grants access to. |
UserSettings
ClickHouse user settings. Supported settings are a limited subset of all settings
described in ClickHouse documentation
Field |
Description |
readonly |
Restricts permissions for non-DDL queries. To restrict permissions for DDL queries, use
See in-depth description in ClickHouse documentation |
allowDdl |
Determines whether DDL queries are allowed (e.g., CREATE, ALTER, RENAME, etc). Default value: true. See in-depth description in ClickHouse documentation |
allowIntrospectionFunctions |
Enables introspections functions More info see in ClickHouse documentation |
connectTimeout |
Connection timeout in milliseconds. Value must be greater than 0 (default: 10000, 10 seconds). |
connectTimeoutWithFailover |
The timeout in milliseconds for connecting to a remote server for a Distributed table engine. Applies only if the cluster uses sharding and replication. If unsuccessful, several attempts are made to connect to various replicas. Default value: 50. More info see in ClickHouse documentation |
receiveTimeout |
Receive timeout in milliseconds. Value must be greater than 0 (default: 300000, 300 seconds or 5 minutes). |
sendTimeout |
Send timeout in milliseconds. Value must be greater than 0 (default: 300000, 300 seconds or 5 minutes). |
timeoutBeforeCheckingExecutionSpeed |
Timeout (in seconds) between checks of execution speed. It is checked that execution speed is not less that specified in Default value: 10. |
insertQuorum |
Enables or disables write quorum for ClickHouse cluster. When used, write quorum guarantees that ClickHouse has written data to the quorum of insert_quorum replicas with no errors until the You can use See in-depth description in ClickHouse documentation |
insertQuorumTimeout |
Quorum write timeout in milliseconds. If the write quorum is enabled in the cluster, this timeout expires and some data is not written to the Minimum value: 1000, 1 second (default: 60000, 1 minute). |
insertQuorumParallel |
See in-depth description in ClickHouse documentation |
insertNullAsDefault |
Enables the insertion of default values instead of NULL into columns with not nullable data type. Default value: true. More info see in ClickHouse documentation |
selectSequentialConsistency |
Determines the behavior of SELECT queries from the replicated table: if enabled, ClickHouse will terminate a query with error message in case the replica does not have a chunk written with the quorum and will not read the parts that have not yet been written with the quorum. Default value: false (sequential consistency is disabled). |
deduplicateBlocksInDependentMaterializedViews |
See in-depth description in ClickHouse documentation |
replicationAlterPartitionsSync |
Wait mode for asynchronous actions in ALTER queries on replicated tables:
See in-depth description in ClickHouse documentation |
maxReplicaDelayForDistributedQueries |
Max replica delay in milliseconds. If a replica lags more than the set value, this replica is not used and becomes a stale one. Minimum value: 1000, 1 second (default: 300000, 300 seconds or 5 minutes). See in-depth description in ClickHouse documentation |
fallbackToStaleReplicasForDistributedQueries |
Enables or disables query forcing to a stale replica in case the actual data is unavailable. Default value: true (query forcing is enabled). See in-depth description in ClickHouse documentation |
distributedProductMode |
enum DistributedProductMode Determine the behavior of distributed subqueries. See in-depth description in ClickHouse documentation
|
distributedAggregationMemoryEfficient |
Enables of disables memory saving mode when doing distributed aggregation. When ClickHouse works with a distributed query, external aggregation is done on remote servers. Default value: false (memory saving mode is disabled). See in-depth description in ClickHouse documentation |
distributedDdlTaskTimeout |
Timeout for DDL queries, in milliseconds. |
skipUnavailableShards |
Enables or disables silent skipping of unavailable shards. A shard is considered unavailable if all its replicas are also unavailable. Default value: false (silent skipping is disabled). See in-depth description in ClickHouse documentation |
compileExpressions |
Enables or disables expression compilation. Use this setting in combination with Default value: false (expression compilation is disabled). |
minCountToCompileExpression |
How many identical expressions ClickHouse has to encounter before they are compiled. Minimum value: 0 (default: 3). For the 0 value compilation is synchronous: a query waits for expression compilation process to complete prior to continuing execution. For all other values, compilation is asynchronous: the compilation process executes in a separate thread. |
maxBlockSize |
The maximum block size for reading. Data in ClickHouse is organized and processed by blocks (block is a set of columns' parts). This setting is a recommendation for size of block (in a count of rows) that should be loaded from tables. Value must be greater than 0 (default: 65536). See in-depth description in ClickHouse documentation |
minInsertBlockSizeRows |
Limits the minimum number of rows in a block to be inserted in a table by INSERT query. Minimal value: 0, block squashing is disabled (default: 1048576). |
minInsertBlockSizeBytes |
Limits the minimum number of bytes in a block to be inserted in a table by INSERT query. Minimal value: 0, block squashing is disabled (default: 268435456, 256 MB). |
maxInsertBlockSize |
Allows to form blocks of the specified size (in bytes) when inserting data in a table. Value must be greater than 0 (default: 1048576). See in-depth description in ClickHouse documentation |
minBytesToUseDirectIo |
Limits the minimum number of bytes to enable unbuffered direct reads from disk (Direct I/O). By default, ClickHouse does not read data directly from disk, but relies on the filesystem and its cache instead. If the total amount of the data to read is greater than the value of this setting, then ClickHouse will fetch this data directly from the disk. Minimal value and default value: 0, Direct I/O is disabled. |
useUncompressedCache |
Determines whether to use the cache of uncompressed blocks, or not. This setting has effect only for tables of the MergeTree family. Default value: false (uncompressed cache is disabled). See in-depth description in ClickHouse documentation |
mergeTreeMaxRowsToUseCache |
Limits the maximum size in rows of the request that can use the cache of uncompressed data. The cache is not used for requests larger Use this setting in combination with Value must be greater than 0 (default: 128x8192). |
mergeTreeMaxBytesToUseCache |
Limits the maximum size in bytes of the request that can use the cache of uncompressed data. The cache is not used for requests larger Use this setting in combination with Value must be greater than 0 (default: 192x10x1024x1024). |
mergeTreeMinRowsForConcurrentRead |
Limits the minimum number of rows to be read from a file to enable concurrent read. This setting has effect only for tables of the MergeTree family. Value must be greater than 0 (default: 20x8192). |
mergeTreeMinBytesForConcurrentRead |
Limits the number of bytes to be read from a file to enable concurrent read. This setting has effect only for tables of the MergeTree family. Value must be greater than 0 (default: 24x10x1024x1024). |
maxBytesBeforeExternalGroupBy |
Sets the threshold of RAM consumption (in bytes) after that the temporary data, collected during the GROUP BY operation, should be flushed to disk to limit the RAM comsumption. By default, aggregation is done by employing hash table that resides in RAM. Minimal value and default value: 0, GROUP BY in the external memory is disabled. When using aggregation in external memory, it is recommended to set the value of this setting twice as low as the See in-depth description in ClickHouse documentation See also: the |
maxBytesBeforeExternalSort |
This setting is equivalent of the |
groupByTwoLevelThreshold |
Sets the threshold of the number of keys, after that the two-level aggregation should be used. Minimal value: 0, threshold is not set (default: 10000). |
groupByTwoLevelThresholdBytes |
Sets the threshold of the number of bytes, after that the two-level aggregation should be used. Minimal value: 0, threshold is not set (default: 100000000). |
priority |
Sets the priority of a query.
This setting should be set up for each query individually. If ClickHouse is working with the high-priority queries, and a low-priority query enters, then the low-priority query is paused until higher-priority queries are completed. Minimal value and default value: 0, priority is not used. |
maxThreads |
Limits the maximum number of threads to process the request (setting does not take threads that read data from remote servers into account). This setting applies to threads that perform the same stages of the query processing pipeline in parallel. Minimal value and default value: 0 (the thread number is calculated automatically based on the number of physical CPU cores, no HyperThreading cores are taken into account). See in-depth description in ClickHouse documentation |
maxMemoryUsage |
Limits the maximum memory usage (in bytes) for processing of a single user's query on a single server. This limitation is enforced for any user's single query on a single server. Minimal value: 0, no limitation is set. If you use See in-depth description in ClickHouse documentation |
maxMemoryUsageForUser |
Limits the maximum memory usage (in bytes) for processing of user's queries on a single server. This limitation is enforced for all queries that belong to one user and run simultaneously on a single server. Minimal value and default value: 0, no limitation is set. |
maxNetworkBandwidth |
The maximum speed of data exchange over the network in bytes per second for a query. Minimal value and default value: 0, no limitation is set. |
maxNetworkBandwidthForUser |
The maximum speed of data exchange over the network in bytes per second for all concurrently running user queries. Minimal value and default value: 0, no limitation is set. |
maxPartitionsPerInsertBlock |
See in-depth description in ClickHouse documentation |
maxConcurrentQueriesForUser |
The maximum number of concurrent requests per user. |
forceIndexByDate |
If enabled, query is not executed if the ClickHouse can't use index by date. Default value: false (setting is disabled, query executes even if ClickHouse can't use index by date). See in-depth description in ClickHouse documentation |
forcePrimaryKey |
If enabled, query is not executed if the ClickHouse can't use index by primary key. Default value: false (setting is disabled, query executes even if ClickHouse can't use index by primary key). See in-depth description in ClickHouse documentation |
maxRowsToRead |
Limits the maximum number of rows that can be read from a table when running a query. Minimal value and default value: 0, no limitation is set. See in-depth description in ClickHouse documentation |
maxBytesToRead |
Limits the maximum number of bytes (uncompressed data) that can be read from a table when running a query. Minimal value and default value: 0, no limitation is set. |
readOverflowMode |
enum OverflowMode Determines the behavior on exceeding limits
|
maxRowsToGroupBy |
Limits the maximum number of unique keys received from aggregation function. Minimal value and default value: 0, no limitation is set. |
groupByOverflowMode |
enum GroupByOverflowMode Determines the behavior on exceeding limits
|
maxRowsToSort |
Limits the maximum number of rows that can be read from a table for sorting. Minimal value and default value: 0, no limitation is set. |
maxBytesToSort |
Limits the maximum number of bytes (uncompressed data) that can be read from a table for sorting. Minimal value and default value: 0, no limitation is set. |
sortOverflowMode |
enum OverflowMode Determines the behavior on exceeding limits
|
maxResultRows |
Limits the number of rows in the result. Minimal value and default value: 0, no limitation is set. |
maxResultBytes |
Limits the number of bytes in the result. Minimal value and default value: 0, no limitation is set. |
resultOverflowMode |
enum OverflowMode Determines the behavior on exceeding limits
|
maxRowsInDistinct |
Limits the maximum number of different rows when using DISTINCT. Minimal value and default value: 0, no limitation is set. |
maxBytesInDistinct |
Limits the maximum size of a hash table in bytes (uncompressed data) when using DISTINCT. |
distinctOverflowMode |
enum OverflowMode Determines the behavior on exceeding limits
|
maxRowsToTransfer |
Limits the maximum number of rows that can be passed to a remote server or saved in a temporary table when using GLOBAL IN. Minimal value and default value: 0, no limitation is set. |
maxBytesToTransfer |
Limits the maximum number of bytes (uncompressed data) that can be passed to a remote server or saved in a temporary Minimal value and default value: 0, no limitation is set. |
transferOverflowMode |
enum OverflowMode Determines the behavior on exceeding limits
|
maxExecutionTime |
Limits the maximum query execution time in milliseconds. Minimal value and default value: 0, no limitation is set. |
timeoutOverflowMode |
enum OverflowMode Determines the behavior on exceeding limits
|
maxRowsInSet |
Limit on the number of rows in the set resulting from the execution of the IN section. |
maxBytesInSet |
Limit on the number of bytes in the set resulting from the execution of the IN section. |
setOverflowMode |
enum OverflowMode Determine the behavior on exceeding max_rows_in_set or max_bytes_in_set limit.
|
maxRowsInJoin |
Limit on maximum size of the hash table for JOIN, in rows. |
maxBytesInJoin |
Limit on maximum size of the hash table for JOIN, in bytes. |
joinOverflowMode |
enum OverflowMode Determine the behavior on exceeding max_rows_in_join or max_bytes_in_join limit.
|
joinAlgorithm[] |
enum JoinAlgorithm See in-depth description in ClickHouse documentation
|
anyJoinDistinctRightTableKeys |
See in-depth description in ClickHouse documentation |
maxColumnsToRead |
Limits the maximum number of columns that can be read from a table in a single query. Minimal value and default value: 0, no limitation is set. |
maxTemporaryColumns |
Limits the maximum number of temporary columns that must be kept in RAM at the same time when running a query, including constant columns. Minimal value and default value: 0, no limitation is set. |
maxTemporaryNonConstColumns |
Limits the maximum number of temporary columns that must be kept in RAM at the same time when running a query, excluding constant columns. Minimal value and default value: 0, no limitation is set. |
maxQuerySize |
Limits the size of the part of a query that can be transferred to RAM for parsing with the SQL parser, in bytes. Value must be greater than 0 (default: 262144). See in-depth description in ClickHouse documentation |
maxAstDepth |
Limits the maximum depth of query syntax tree. Executing a big and complex query may result in building a syntax tree of enormous depth. For example, the **SELECT *** query may result in more complex and deeper syntax tree, compared to the SELECT ... WHERE ... query, containing constraints and conditions, in the most cases. Value must be greater than 0 (default: 1000). See in-depth description in ClickHouse documentation |
maxAstElements |
Limits the maximum size of query syntax tree in number of nodes. Executing a big and complex query may result in building a syntax tree of enormous size. Value must be greater than 0 (default: 50000). See in-depth description in ClickHouse documentation |
maxExpandedAstElements |
Limits the maximum size of query syntax tree in number of nodes after expansion of aliases and the asterisk values. Executing a big and complex query may result in building a syntax tree of enormous size. Value must be greater than 0 (default: 500000). |
minExecutionSpeed |
Minimal execution speed in rows per second. |
minExecutionSpeedBytes |
Minimal execution speed in bytes per second. |
countDistinctImplementation |
enum CountDistinctImplementation Aggregate function to use for implementation of count(DISTINCT ...).
|
inputFormatValuesInterpretExpressions |
Enables or disables SQL parser if the fast stream parser cannot parse the data. Enable this setting, if the data that you want to insert into a table contains SQL expressions. For example, the stream parser is unable to parse a value that contains now() expression; therefore an INSERT query for this value will fail and no data will be inserted into a table. This setting has effect only if you use Values Default value: true (SQL parser is enabled). See in-depth description in ClickHouse documentation |
inputFormatDefaultsForOmittedFields |
Enables or disables replacing omitted input values with default values of the respective columns when performing INSERT queries. Default value: true (replacing is enabled). |
inputFormatNullAsDefault |
See in-depth description in ClickHouse documentation |
dateTimeInputFormat |
enum DateTimeInputFormat See in-depth description in ClickHouse documentation
|
inputFormatWithNamesUseHeader |
See in-depth description in ClickHouse documentation |
outputFormatJsonQuote_64bitIntegers |
Enables quoting of 64-bit integers in JSON output format. If this setting is enabled, then 64-bit integers (UInt64 and Int64) will be quoted when written to JSON output in order to maintain compatibility with the most of the JavaScript engines. Default value: false (quoting 64-bit integers is disabled). |
outputFormatJsonQuoteDenormals |
Enables special floating-point values (+nan, -nan, +inf and -inf) in JSON output format. Default value: false (special values do not present in output). |
dateTimeOutputFormat |
enum DateTimeOutputFormat See in-depth description in ClickHouse documentation
|
lowCardinalityAllowInNativeFormat |
Determines whether to use LowCardinality type in Native format.
LowCardinality columns (aka sparse columns) store data in more effective way, compared to regular columns, by using hash tables. If you use a third-party ClickHouse client that can't work with LowCardinality columns, then this client will not be able to correctly interpret the result of the query that asks for data stored in LowCardinality column. Official ClickHouse client works with LowCardinality columns out-of-the-box. Default value: true (LowCardinality columns are used in Native format). |
allowSuspiciousLowCardinalityTypes |
Allows specifying LowCardinality modifier for types of small fixed size (8 or less) in CREATE TABLE statements. Enabling this may increase merge times and memory consumption. More info see in ClickHouse documentation |
emptyResultForAggregationByEmptySet |
Enables returning of empty result when aggregating without keys (with GROUP BY operation absent) on empty set (e.g., SELECT count(*) FROM table WHERE 0).
|
httpConnectionTimeout |
HTTP connection timeout, in milliseconds. Value must be greater than 0 (default: 1000, 1 second). |
httpReceiveTimeout |
HTTP receive timeout, in milliseconds. Value must be greater than 0 (default: 1800000, 1800 seconds, 30 minutes). |
httpSendTimeout |
HTTP send timeout, in milliseconds. Value must be greater than 0 (default: 1800000, 1800 seconds, 30 minutes). |
enableHttpCompression |
Enables or disables data compression in HTTP responses. By default, ClickHouse stores data compressed. When executing a query, its result is uncompressed. Enable this setting and add the Accept-Encoding: ClickHouse support the following compression methods: gzip, br and deflate. Default value: false (compression is disabled). See in-depth description in ClickHouse documentation |
sendProgressInHttpHeaders |
Enables progress notifications using X-ClickHouse-Progress HTTP header. Default value: false (notifications disabled). |
httpHeadersProgressInterval |
Minimum interval between progress notifications with X-ClickHouse-Progress HTTP header, in milliseconds. Value must be greater than 0 (default: 100). |
addHttpCorsHeader |
Adds CORS header in HTTP responses. Default value: false (header is not added). |
cancelHttpReadonlyQueriesOnClientClose |
Cancels HTTP read-only queries (e.g. SELECT) when a client closes the connection without waiting for the response. Default value: false. More info see in ClickHouse documentation |
maxHttpGetRedirects |
Limits the maximum number of HTTP GET redirect hops for URL-engine If the parameter is set to 0 (default), no hops is allowed. More info see in ClickHouse documentation |
joinedSubqueryRequiresAlias |
|
joinUseNulls |
|
transformNullIn |
|
quotaMode |
enum QuotaMode Quota accounting mode. Possible values: QUOTA_MODE_DEFAULT, QUOTA_MODE_KEYED and QUOTA_MODE_KEYED_BY_IP.
|
flattenNested |
Sets the data format of a nested More info see in ClickHouse documentation |
formatRegexp |
string Regular expression (for Regexp format) |
formatRegexpEscapingRule |
enum FormatRegexpEscapingRule See in-depth description in ClickHouse documentation
|
formatRegexpSkipUnmatched |
See in-depth description in ClickHouse documentation |
asyncInsert |
Enables asynchronous inserts. Disabled by default. More info see in ClickHouse documentation |
asyncInsertThreads |
The maximum number of threads for background data parsing and insertion. If the parameter is set to 0, asynchronous insertions are disabled. Default value: 16. More info see in ClickHouse documentation |
waitForAsyncInsert |
Enables waiting for processing of asynchronous insertion. If enabled, server returns OK only after the data is inserted. More info see in ClickHouse documentation |
waitForAsyncInsertTimeout |
The timeout (in seconds) for waiting for processing of asynchronous insertion. Default value: 120. More info see in ClickHouse documentation |
asyncInsertMaxDataSize |
The maximum size of the unparsed data in bytes collected per query before being inserted. If the parameter is set to 0, asynchronous insertions are disabled. Default value: 100000. More info see in ClickHouse documentation |
asyncInsertBusyTimeout |
The maximum timeout in milliseconds since the first INSERT query before inserting collected data. If the parameter is set to 0, the timeout is disabled. Default value: 200. More info see in ClickHouse documentation |
asyncInsertStaleTimeout |
The maximum timeout in milliseconds since the last INSERT query before dumping collected data. If enabled, the settings prolongs the More info see in ClickHouse documentation |
memoryProfilerStep |
Memory profiler step (in bytes). If the next query step requires more memory than this parameter specifies, the memory profiler collects the allocating stack trace. Values lower than a few megabytes slow down query processing. Default value: 4194304 (4 MB). Zero means disabled memory profiler. |
memoryProfilerSampleProbability |
Collect random allocations and deallocations and write them into system.trace_log with 'MemorySample' trace_type. The probability is for every alloc/free regardless to the size of the allocation. Possible values: from 0 to 1. Default: 0. |
maxFinalThreads |
Sets the maximum number of parallel threads for the SELECT query data read phase with the FINAL modifier. |
inputFormatParallelParsing |
Enables or disables order-preserving parallel parsing of data formats. Supported only for TSV |
inputFormatImportNestedJson |
Enables or disables the insertion of JSON data with nested objects. |
localFilesystemReadMethod |
enum LocalFilesystemReadMethod Method of reading data from local filesystem, one of: read, pread, mmap, io_uring, pread_threadpool. The 'io_uring' method is experimental and does not work for Log, TinyLog, StripeLog, File, Set and Join, and other tables with append-able files in presence of concurrent reads and writes.
|
maxReadBufferSize |
The maximum size of the buffer to read from the filesystem. |
insertKeeperMaxRetries |
The setting sets the maximum number of retries for ClickHouse Keeper (or ZooKeeper) requests during insert into replicated MergeTree. Only Keeper requests which failed due to network error, Keeper session timeout, or request timeout are considered for retries. |
maxTemporaryDataOnDiskSizeForUser |
The maximum amount of data consumed by temporary files on disk in bytes for all concurrently running user queries. Zero means unlimited. |
maxTemporaryDataOnDiskSizeForQuery |
The maximum amount of data consumed by temporary files on disk in bytes for all concurrently running queries. Zero means unlimited. |
maxParserDepth |
Limits maximum recursion depth in the recursive descent parser. Allows controlling the stack size. |
remoteFilesystemReadMethod |
enum RemoteFilesystemReadMethod Method of reading data from remote filesystem, one of: read, threadpool.
|
memoryOvercommitRatioDenominator |
It represents soft memory limit in case when hard limit is reached on user level. This value is used to compute overcommit ratio for the query. Zero means skip the query. |
memoryOvercommitRatioDenominatorForUser |
It represents soft memory limit in case when hard limit is reached on global level. This value is used to compute overcommit ratio for the query. Zero means skip the query. |
memoryUsageOvercommitMaxWaitMicroseconds |
Maximum time thread will wait for memory to be freed in the case of memory overcommit on a user level. If the timeout is reached and memory is not freed, an exception is thrown. |
logQueryThreads |
Setting up query threads logging. Query threads log into the system.query_thread_log |
maxInsertThreads |
The maximum number of threads to execute the INSERT SELECT query. |
useHedgedRequests |
Enables hedged requests logic for remote queries. It allows to establish many connections with different replicas for query. New connection is enabled in case existent connection(s) with replica(s) were not established within hedged_connection_timeout or no data was received within receive_data_timeout. Query uses the first connection which send non empty progress packet (or data packet, if allow_changing_replica_until_first_data_packet); other connections are cancelled. Queries with max_parallel_replicas > 1 are supported. |
idleConnectionTimeout |
Timeout to close idle TCP connections after specified number of milliseconds. |
hedgedConnectionTimeoutMs |
Connection timeout for establishing connection with replica for Hedged requests. |
loadBalancing |
enum LoadBalancing Specifies the algorithm of replicas selection that is used for distributed query processing, one of: random, nearest_hostname, in_order, first_or_random, round_robin.
|
preferLocalhostReplica |
Enables/disables preferable using the localhost replica when processing distributed queries. |
compile |
The setting is deprecated and has no effect. |
minCountToCompile |
The setting is deprecated and has no effect. |
UserQuota
ClickHouse quota representation. Each quota associated with an user and limits it resource usage for an interval.
See in-depth description ClickHouse documentation
Field |
Description |
intervalDuration |
Duration of interval for quota in milliseconds. |
queries |
The total number of queries. |
errors |
The number of queries that threw exception. |
resultRows |
The total number of rows given as the result.. |
readRows |
The total number of source rows read from tables for running the query, on all remote servers. |
executionTime |
The total query execution time, in milliseconds (wall time). |