Closed xxramm16916 closed 1 year ago
Hi!
You can execute the command SET setting=value
. This command sets the value of the property for the connection.
await using var connection = new ClickHouseConnection(_connectionStringBuilder);
await connection.OpenAsync(cancellationToken);
var cmd = connection.CreateCommand();
cmd.CommandText = "SET insert_distributed_sync = 1";
await cmd.ExecuteNonQueryAsync(cancellationToken);
await using ClickHouseColumnWriter writer = await connection
.CreateColumnWriterAsync("INSERT INTO db.testtable(num, id, str) VALUES", cancellationToken);
await writer.WriteTableAsync(definition.Data, definition.Count, cancellationToken);
thank you)