-
Notifications
You must be signed in to change notification settings - Fork 63
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
batch insert gives error #86
Comments
This looks like a Postgres error. Are you able to run a smaller batch? |
I could run a small batch with 3 or might be more but it does insertion on
table but throws that error even batch with length 1 .
…On Fri, Apr 2, 2021 at 12:55 AM Jeremy Daly ***@***.***> wrote:
This looks like a Postgres error. Are you able to run a smaller batch?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS762I2CRSUCR4YSCV6Z6RDTGTAIZANCNFSM42GLEZ3A>
.
|
what would be the solution for this @jeremydaly |
@ffxsam Any thoughts on this? Haven't seen this error with batches before. |
@jeremydaly today I got another situation that if table not exist then batch insertion execution is only done for 1 batch more than one it gives error but after 1 batch entry or table exist then more than 1 batch be inserted.Is this from my side or the issue (I have used create table if not exist query to create table and followed by insert script) |
No, sorry I can't be of any help. I actually don't use batch inserts very often. Plus, I'm using knex to build all my queries before passing the resulting string to |
@sam , could you suggest a library for knex that is compatible with
data-api. I tried to do with knex.js only but couldn't connect using aws
arn
…On Sun, Apr 4, 2021 at 5:24 AM Sam Hulick ***@***.***> wrote:
No, sorry I can't be of any help. I actually don't use batch inserts very
often. Plus, I'm using knex to build all my queries before passing the
resulting string to dataApi.query().
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS762IZ4O5FFPFWWUGCD4J3TG6RKFANCNFSM42GLEZ3A>
.
|
And also use case here is that need to perform migration , could you
please suggest how to I perform that trough data-api-client
…On Mon, Jun 7, 2021 at 1:29 PM Rabi Gautam ***@***.***> wrote:
@sam , could you suggest a library for knex that is compatible with
data-api. I tried to do with knex.js only but couldn't connect using aws
arn
On Sun, Apr 4, 2021 at 5:24 AM Sam Hulick ***@***.***>
wrote:
> No, sorry I can't be of any help. I actually don't use batch inserts very
> often. Plus, I'm using knex to build all my queries before passing the
> resulting string to dataApi.query().
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#86 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AS762IZ4O5FFPFWWUGCD4J3TG6RKFANCNFSM42GLEZ3A>
> .
>
|
@rabiSharelookapp knex works fine with dataApi. You can use it like this: const knex = require('knex')({ client: 'pg' });
async function doTheThing() {
const results = await dataApi.query(knex('my_table').select('a', 'b', 'c'));
} As for your other question, that's a bit of a general and very involved question that I unfortunately don't have time to help with. |
okay thanks
…On Mon, Jun 7, 2021 at 9:07 PM Sam Hulick ***@***.***> wrote:
@rabiSharelookapp <https://github.com/rabiSharelookapp> knex works fine
with dataApi. You can use it like this:
const knex = require('knex')({ client: 'pg' });
async function doTheThing() {
const results = await dataApi.query(knex('my_table').select('a', 'b', 'c'));}
As for your other question, that's a bit of a general and very involved
question that I unfortunately don't have time to help with.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#86 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AS762I3BWQH5E4NXM4VIMW3TRTP3HANCNFSM42GLEZ3A>
.
|
while query is done for batchInsert it insert the multiple row but throws an error "BadRequestException:Batch entry 1 was aborted: Too many update results were returned. Call getNextException to see othe errors in the batch". though the items passed as same structure as in document . Here 1 is number of entry
The text was updated successfully, but these errors were encountered: