Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSERT ... SETTINGS syntax does not work with bulk insertion #173

Open
vphoenix1972 opened this issue Jun 4, 2024 · 0 comments
Open

INSERT ... SETTINGS syntax does not work with bulk insertion #173

vphoenix1972 opened this issue Jun 4, 2024 · 0 comments

Comments

@vphoenix1972
Copy link

Description

I am trying to set query level settings with bulk insertion:

using var command = connection.CreateCommand();
            
command.CommandText =
@"insert into traffic
    (column1, column2, column3)
settings parallel_view_processing = true
values @bulk";

command.Parameters.Add(new ClickHouseParameter
{
    ParameterName = "bulk",
    Value = new MyBulkInsertObject(traffic)
});

command.ExecuteNonQuery();

But it returns with error:

ClickHouse.Ado.ClickHouseException: DB::ParsingException: Cannot parse input: expected '(' before: '\'val1\',\'val2\',\'val3\':  at row 0: While executing ValuesBlockInputFormat
2024-06-04 16:30:24    at ClickHouse.Ado.Impl.ProtocolFormatter.ReadAndThrowException(CancellationToken cToken)
2024-06-04 16:30:24    at ClickHouse.Ado.Impl.ProtocolFormatter.ReadPacket(Response rv, CancellationToken cToken)
2024-06-04 16:30:24    at ClickHouse.Ado.Impl.ProtocolFormatter.ReadResponse(CancellationToken cToken)
2024-06-04 16:30:24    at ClickHouse.Ado.ClickHouseCommand.Execute(Boolean readResponse, ClickHouseConnection connection, CancellationToken cToken)
2024-06-04 16:30:24    at ClickHouse.Ado.ClickHouseCommand.ExecuteNonQueryAsync(CancellationToken cToken)
2024-06-04 16:30:24    at ClickHouse.Ado.ClickHouseCommand.ExecuteNonQuery()

What should be done

It looks like a bug. Is 'INSERT ... SETTINGS' syntax supported with bulk insertion functionality?

v2.0.5
Clickhouse 23.11.3.23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant