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 into from infile fails with Internal error. Message code "TableColumns" not supported. #95

Closed
lsoft opened this issue Jan 29, 2025 · 2 comments

Comments

@lsoft
Copy link

lsoft commented Jan 29, 2025

When I try to execute

insert into MyTableName
from infile 'file name'
format CSVWithNames;

with the code

        public static async Task ExecuteNonQueryAsync(
            this ClickHouseConnection connection,
            string commandText
            )
        {
            await using (var command = connection.CreateCommand(commandText))
            {
                await command.ExecuteNonQueryAsync();
            }
        }

I get

System.NotSupportedException: 'Internal error. Message code "TableColumns" not supported.'

I can confirm that table and file exists. The same command started from clickhouse client works fine.

did I miss somethind? Any ideas? Workarounds? I'm completely stuck here, because our ETL process is based on csv files and this cannot be changed.

Thanks!

@lsoft
Copy link
Author

lsoft commented Jan 29, 2025

infile is not a part of the protocol.

@lsoft lsoft closed this as completed Jan 29, 2025
@SergeyMirvoda
Copy link
Contributor

It is the nice feature to have like select from program in postgres.

But yes, according to docs it is clickhouse-client's feature.

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

2 participants