questdb
questdb copied to clipboard
questdb show me "table already specified"
Describe the bug
- qdb version 6.6.1
- insert protocol 9009
- during insert, I ever update some data
- and then , when I keep inserting data , qdb show me "table already specified"
To reproduce
No response
Expected Behavior
how can I deal the problem?
Environment
- **QuestDB version**:
- **OS**:
- **Browser**:
Additional context
No response
Can you provide step by step instructions how I can reproduce this please?
@tangweidali could you help us understand the reproducer better? I'm afraid the current description isn't enough.
@ideoma, @puzpuzpuz, @tangweidali, and anyone else experiencing this issue,
I experienced similar issue, using LineTcpSender
instance.
First row would insert, second would throw me the exception,
Originally I had the code as below:
lineTcpSender.Table("myTable").Column("CreateDate", entity.CreateDate).Column("Description", entity.Description).Column("UniqueId", $"{entity.UniqueId}").Send();
To fix this, the lineTcpSender.Table("myTable") should be called only once, .Column and .Send() or .SendAsync() are called each time new row is being inserted,
- Set table which rows are being inserted to:
lineTcpSender.Table("myTable");
- Insert column values for each row being inserted:
lineTcpSender.Column("CreateDate", entity.CreateDate).Column("Description", entity.Description).Column("UniqueId", $"entity.UniqueId}") .Send();
Hi @tomaszkstech
I assume you are using .NET client (https://github.com/questdb/net-questdb-client/). You should call At()
at the end of the call chain for each row:
lineTcpSender.Column("CreateDate", entity.CreateDate)
.Column("Description", entity.Description)
.Column("UniqueId", $"entity.UniqueId}")
.At(DateTime.UtcNow);
// Insert more rows here
// ...
// Send them over the wire all at once:
lineTcpSender.Send();
I think this can be closed as error mentioned on title is likely due to developer coding error while using LineTcpSender