Closed negreanucalin closed 1 year ago
Hello I am trying to do batch inserts and took this as an example, just thought that this library implemented batching.
In short I need to 20-30 inserts at once and tried to run this (is a test to insert 5 entries) query object:
{ name: 'buildInsertBatch', text: 'INSERT INTO call (id, caller, calling) VALUES (?, ?, ?)', values: [ [call.getCallId(), call.getCallId(), call.getCallId(), call.getCallId(), call.getCallId()], [call.getCaller(), call.getCaller(), call.getCaller(), call.getCaller(), call.getCaller()], [call.getCalling(),call.getCalling(), call.getCalling(), call.getCalling(), call.getCalling()] ] }
But I get the following error: INSERT has more expressions than target columns
Is there any way to achieve with this library?
Figured out I can use vertica's syntax:
INSERT INTO calls (call_id,other) values ('1.0', 'other0'),('1.0', 'other1'),('1.0', 'other2'),('1.0', 'other3')
Hello I am trying to do batch inserts and took this as an example, just thought that this library implemented batching.
In short I need to 20-30 inserts at once and tried to run this (is a test to insert 5 entries) query object:
But I get the following error: INSERT has more expressions than target columns
Is there any way to achieve with this library?