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

How can I use Bulk insertion in a table with nested columns #240

Open
mucahitimre opened this issue Nov 30, 2022 · 2 comments
Open

How can I use Bulk insertion in a table with nested columns #240

mucahitimre opened this issue Nov 30, 2022 · 2 comments
Assignees

Comments

@mucahitimre
Copy link

mucahitimre commented Nov 30, 2022

How can send nested columns values?

It gives this error when I send the list as an object array below:

ClickHouse.Client.Copy.ClickHouseBulkCopySerializationException: Error when serializing data ---> System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List1[System.Object[]]' to type 'System.Runtime.CompilerServices.ITuple'.
at ClickHouse.Client.Types.TupleType.Write(ExtendedBinaryWriter writer, Object value)
at ClickHouse.Client.Copy.ClickHouseBulkCopy.d__28.MoveNext()
--- End of inner exception stack trace ---
at ClickHouse.Client.Copy.ClickHouseBulkCopy.d__28.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at ClickHouse.Client.Copy.ClickHouseBulkCopy.d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()`

@DarkWanderer DarkWanderer self-assigned this Dec 5, 2022
@DarkWanderer
Copy link
Owner

Hi,

Could you please provide an example table structure and data you expect to insert?

@wub
Copy link

wub commented Feb 5, 2023

@mucahitimre This may sound silly, but double check the table (and the schema of the table) you're attempting to insert into. I was getting a similar error because I forgot to ALTER my table.

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

3 participants