question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Efficient bulk inserts (single bulk insert statement)

See original GitHub issue

https://github.com/aws/amazon-redshift-python-driver/blob/e0192784f5c949da50469a566599a1cc519670f1/redshift_connector/cursor.py#L235

In the above i see executemany() function runs the query in loop. In redshift say if i am loading thousands of records into redshift via a lambda, i would like to have a method which can run a single bulk insert statement

Eg

INSERT INTO 
    links (url, name)
VALUES
    ('https://www.google.com','Google'),
    ('https://www.yahoo.com','Yahoo'),
    ('https://www.bing.com','Bing');

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
Yash621commented, Feb 7, 2022

@Brooke-white @kishaningithub @david-dest01 it was great experience to collaborate with you all.

1reaction
Brooke-whitecommented, Jan 4, 2022

@kishaningithub, please take a look at #81 so we can ensure this PR satisfies your use case 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Comparing multiple rows insert vs single ... - Redgate Software
You can use bulk copy (bcp), insert the data with a series of INSERT ... The feature, Inserting Multiple Rows Using a Single...
Read more >
How to Bulk Insert Complex Objects into SQL Server Database
One solution is to somehow tag records that are going to be inserted using SqlBulkCopy object. Then, use this tag to fetch identity...
Read more >
Using Automate to Facilitate SQL Bulk Inserts - Fortra
Run SQL Connection Task. Now you need to enter in the following Query: BULK INSERT Sample.dbo.BulkInsertEx. FROM 'C:\BulkSample.txt'
Read more >
mysql - Which is faster: multiple single INSERTs or one ...
If you are inserting many rows from the same client at the same time, use INSERT statements with multiple VALUES lists to insert...
Read more >
SQL Bulk Insert Concurrency and Performance Considerations
One of the challenges we face when using SQL bulk insert from ... Our query of the table after the rollback – all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found