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

"sql_insert" failed with ERROR ...too many parameters in Microsoft SQL server #2424

Closed
JuliaPipson opened this issue Mar 14, 2024 · 1 comment
Labels

Comments

@JuliaPipson
Copy link

JuliaPipson commented Mar 14, 2024

We tried to build benthos flow which read records from file and insert them into a table in Microsoft SQL server 2019,
We have used unarchive with json_array and then send it to output section:
"...
output:
sql_insert:
...
"

We tried to use batching with sql_insert but it failed with or without this section.
ERROR:
The incoming request has too many parameters. The server supports a maximum of 2100 parameters

Our solution for now, was to use sql_raw, there we did insert query, one row each insert. But we know its not efficient way to do it DB (not insert in batch).

Is there a way to insert bulk/multiple rows and limit the max row in each insert ?

@Jeffail
Copy link
Collaborator

Jeffail commented Mar 15, 2024

Hey @JuliaPipson, take a look at the split processor: https://www.benthos.dev/docs/components/processors/split, it allows you to break batches down into smaller sizes.

Closing as per: #2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants