Managed Service for ClickHouse API, gRPC: ClusterService.ListExternalDictionaries
Retrieves a list of external dictionaries that belong to specified cluster.
gRPC request
rpc ListExternalDictionaries (ListClusterExternalDictionariesRequest) returns (ListClusterExternalDictionariesResponse)
ListClusterExternalDictionariesRequest
{
"clusterId": "string",
"pageSize": "int64",
"pageToken": "string"
}
Field |
Description |
clusterId |
string Required field. ID of the cluster that the external dictionaries belong to. |
pageSize |
int64 The maximum number of results per page to return. If the number of available |
pageToken |
string Page token. To get the next page of results, set |
ListClusterExternalDictionariesResponse
{
"externalDictionaries": [
{
"name": "string",
"structure": {
"id": {
"name": "string"
},
"key": {
"attributes": [
{
"name": "string",
"type": "string",
"nullValue": "string",
"expression": "string",
"hierarchical": "bool",
"injective": "bool"
}
]
},
"rangeMin": {
"name": "string",
"type": "string",
"nullValue": "string",
"expression": "string",
"hierarchical": "bool",
"injective": "bool"
},
"rangeMax": {
"name": "string",
"type": "string",
"nullValue": "string",
"expression": "string",
"hierarchical": "bool",
"injective": "bool"
},
"attributes": [
{
"name": "string",
"type": "string",
"nullValue": "string",
"expression": "string",
"hierarchical": "bool",
"injective": "bool"
}
]
},
"layout": {
"type": "Type",
"sizeInCells": "int64",
"maxArraySize": "int64"
},
// Includes only one of the fields `fixedLifetime`, `lifetimeRange`
"fixedLifetime": "int64",
"lifetimeRange": {
"min": "int64",
"max": "int64"
},
// end of the list of possible fields
// Includes only one of the fields `httpSource`, `mysqlSource`, `clickhouseSource`, `mongodbSource`, `postgresqlSource`
"httpSource": {
"url": "string",
"format": "string",
"headers": [
{
"name": "string",
"value": "string"
}
]
},
"mysqlSource": {
"db": "string",
"table": "string",
"port": "int64",
"user": "string",
"password": "string",
"replicas": [
{
"host": "string",
"priority": "int64",
"port": "int64",
"user": "string",
"password": "string"
}
],
"where": "string",
"invalidateQuery": "string",
"closeConnection": "google.protobuf.BoolValue",
"shareConnection": "google.protobuf.BoolValue"
},
"clickhouseSource": {
"db": "string",
"table": "string",
"host": "string",
"port": "int64",
"user": "string",
"password": "string",
"where": "string",
"secure": "google.protobuf.BoolValue"
},
"mongodbSource": {
"db": "string",
"collection": "string",
"host": "string",
"port": "int64",
"user": "string",
"password": "string",
"options": "string"
},
"postgresqlSource": {
"db": "string",
"table": "string",
"hosts": [
"string"
],
"port": "int64",
"user": "string",
"password": "string",
"invalidateQuery": "string",
"sslMode": "SslMode"
}
// end of the list of possible fields
}
],
"nextPageToken": "string"
}
Field |
Description |
externalDictionaries[] |
List of ClickHouse Cluster external dictionaries. |
nextPageToken |
string This token allows you to get the next page of results for list requests. If the number of results |
ExternalDictionary
Field |
Description |
name |
string Required field. Name of the external dictionary. |
structure |
Required field. Set of attributes for the external dictionary. |
layout |
Required field. Layout for storing the dictionary in memory. |
fixedLifetime |
int64 Fixed interval between dictionary updates. Includes only one of the fields Setting for the period of time between dictionary updates. |
lifetimeRange |
Range of intervals between dictionary updates for ClickHouse to choose from. Includes only one of the fields Setting for the period of time between dictionary updates. |
httpSource |
HTTP source for the dictionary. Includes only one of the fields Description of the source for the external dictionary. |
mysqlSource |
MySQL source for the dictionary. Includes only one of the fields Description of the source for the external dictionary. |
clickhouseSource |
ClickHouse source for the dictionary. Includes only one of the fields Description of the source for the external dictionary. |
mongodbSource |
MongoDB source for the dictionary. Includes only one of the fields Description of the source for the external dictionary. |
postgresqlSource |
PostgreSQL source for the dictionary. Includes only one of the fields Description of the source for the external dictionary. |
Structure
Field |
Description |
id |
Single numeric key column for the dictionary. |
key |
Composite key for the dictionary, containing of one or more key columns. |
rangeMin |
Field holding the beginning of the range for dictionaries with |
rangeMax |
Field holding the end of the range for dictionaries with |
attributes[] |
Description of the fields available for database queries. |
Id
Numeric key.
Field |
Description |
name |
string Required field. Name of the numeric key. |
Key
Complex key.
Field |
Description |
attributes[] |
Attributes of a complex key. |
Attribute
Field |
Description |
name |
string Required field. Name of the column. |
type |
string Required field. Type of the column. |
nullValue |
string Default value for an element without data (for example, an empty string). |
expression |
string Expression, describing the attribute, if applicable. |
hierarchical |
bool Indication of hierarchy support. |
injective |
bool Indication of injective mapping "id -> attribute". |
Layout
Layout determining how to store the dictionary in memory.
Field |
Description |
type |
enum Type Required field. Layout type for an external dictionary.
|
sizeInCells |
int64 Number of cells in the cache. Rounded up to a power of two. |
maxArraySize |
int64 Maximum dictionary key size. |
Range
Field |
Description |
min |
int64 Minimum dictionary lifetime. |
max |
int64 Maximum dictionary lifetime. |
HttpSource
Field |
Description |
url |
string Required field. URL of the source dictionary available over HTTP. |
format |
string Required field. The data format. Valid values are all formats supported by ClickHouse SQL dialect. |
headers[] |
HTTP headers. |
Header
Field |
Description |
name |
string Required field. |
value |
string Required field. |
MysqlSource
Field |
Description |
db |
string Required field. Name of the MySQL database to connect to. |
table |
string Required field. Name of the database table to use as a ClickHouse dictionary. |
port |
int64 Default port to use when connecting to a replica of the dictionary source. |
user |
string Name of the default user for replicas of the dictionary source. |
password |
string Password of the default user for replicas of the dictionary source. |
replicas[] |
List of MySQL replicas of the database used as dictionary source. |
where |
string Selection criteria for the data in the specified MySQL table. |
invalidateQuery |
string Query for checking the dictionary status, to pull only updated data. |
closeConnection |
Should the connection be closed after each request. |
shareConnection |
Should a connection be shared for some requests. |
Replica
Field |
Description |
host |
string Required field. MySQL host of the replica. |
priority |
int64 Required field. The priority of the replica that ClickHouse takes into account when connecting. |
port |
int64 Port to use when connecting to the replica. |
user |
string Name of the MySQL database user. |
password |
string Password of the MySQL database user. |
ClickhouseSource
Field |
Description |
db |
string Required field. Name of the ClickHouse database. |
table |
string Required field. Name of the table in the specified database to be used as the dictionary source. |
host |
string ClickHouse host of the specified database. |
port |
int64 Port to use when connecting to the host. |
user |
string Required field. Name of the ClickHouse database user. |
password |
string Password of the ClickHouse database user. |
where |
string Selection criteria for the data in the specified ClickHouse table. |
secure |
Use ssl for connection. |
MongodbSource
Field |
Description |
db |
string Required field. Name of the MongoDB database. |
collection |
string Required field. Name of the collection in the specified database to be used as the dictionary source. |
host |
string MongoDB host of the specified database. |
port |
int64 Port to use when connecting to the host. |
user |
string Required field. Name of the MongoDB database user. |
password |
string Password of the MongoDB database user. |
options |
string |
PostgresqlSource
Field |
Description |
db |
string Required field. Name of the PostrgreSQL database. |
table |
string Required field. Name of the table in the specified database to be used as the dictionary source. |
hosts[] |
string Name of the PostrgreSQL host |
port |
int64 Port to use when connecting to the host. |
user |
string Required field. Name of the PostrgreSQL database user. |
password |
string Password of the PostrgreSQL database user. |
invalidateQuery |
string Query for checking the dictionary status, to pull only updated data. |
sslMode |
enum SslMode Mode of SSL TCP/IP connection to the PostgreSQL host.
|