@@ -11,17 +11,35 @@ import (
1111 "github.com/invopop/jsonschema"
1212)
1313
14+ // CloudQuery ClickHouse destination plugin spec.
1415type Spec struct {
16+ // Connection string to connect to the database.
17+ // See [SDK documentation](https://github.com/ClickHouse/clickhouse-go#dsn) for more details.
1518 ConnectionString string `json:"connection_string,omitempty" jsonschema:"required,minLength=1"`
16- Cluster string `json:"cluster,omitempty"`
1719
20+ // Cluster name to be used for [distributed DDL](https://clickhouse.com/docs/en/sql-reference/distributed-ddl).
21+ // If the value is empty, DDL operations will affect only the server the plugin is connected to.
22+ Cluster string `json:"cluster,omitempty"`
23+
24+ // Engine to be used for tables.
25+ // Only [`*MergeTree` family](https://clickhouse.com/docs/en/engines/table-engines/mergetree-family) is supported at the moment.
1826 Engine * Engine `json:"engine,omitempty"`
1927
28+ // PEM-encoded certificate authorities.
29+ // When set, a certificate pool will be created by appending the certificates to the system pool.
30+ //
31+ // See [file variable substitution](/docs/advanced-topics/environment-variable-substitution#file-variable-substitution-example)
32+ // for how to read this value from a file.
2033 CACert string `json:"ca_cert,omitempty"`
2134
22- BatchSize int `json:"batch_size,omitempty" jsonschema:"minimum=1,default=10000"`
23- BatchSizeBytes int `json:"batch_size_bytes,omitempty" jsonschema:"minimum=1,default=5242880"`
24- BatchTimeout * configtype.Duration `json:"batch_timeout,omitempty"`
35+ // This parameter controls the maximum amount of items may be grouped together to be written as a single write.
36+ BatchSize int `json:"batch_size,omitempty" jsonschema:"minimum=1,default=10000"`
37+
38+ // This parameter controls the maximum size of items that may be grouped together to be written as a single write.
39+ BatchSizeBytes int `json:"batch_size_bytes,omitempty" jsonschema:"minimum=1,default=5242880"`
40+
41+ // This parameter controls the maximum interval between batch writes.
42+ BatchTimeout * configtype.Duration `json:"batch_timeout,omitempty"`
2543}
2644
2745func (s * Spec ) Options () (* clickhouse.Options , error ) {
0 commit comments