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.

how to bulk_query?

See original GitHub issue

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12

github_iconTop GitHub Comments

2reactions
moudaycommented, Nov 8, 2018

but。。。 i know pymysql is this:

data = [
    ("student1", 23, "2018-01-31", "M"),
    ("student2", 24, "2018-02-27", "M"),
    ("student3", 28, "2018-03-31", "F"),
    ("student4", 26, "2018-04-30", "M"),
]


rows = cursor.executemany("insert into student(name, age, register_date, gender) "
                               "values (%s, %s, %s, %s)", data)

but it not work,

however, document not write how to use…

finally, thank you agan!

0reactions
Thrimbdacommented, Nov 8, 2018

the source code itself is already a good documentation. have a loot at bulk_query API, it accepts a destructuring param list,

def bulk_query(self, query, *multiparams):
    """Bulk insert or update."""

    self._conn.execute(text(query), *multiparams)

with some experimentation, you’ll know how to use it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bulk API Query - Salesforce Developers
Use bulk query to efficiently query large data sets and reduce the number of API requests. A bulk query can retrieve up to...
Read more >
How are bulk queries processed? | FMCSA
Therefore, all bulk files are processed at approximately the same rate, regardless of the number of queries they contain. Regulatory Topic: Guidance on...
Read more >
Best Practices for Bulk Queries | Cloud Elements Help Center
Bulk queries are a powerful tool to retrieve records in greater numbers than possible when using standard Cloud Elements endpoints.
Read more >
Perform bulk operations with the GraphQL Admin API
Identify a new or existing query that could return a lot of data and would benefit from being a bulk operation. Queries that...
Read more >
Salesforce Bulk Query Activity - Jitterbit Community
The Bulk Query activity is faster and scales better than a non-bulk Salesforce Query activity, but should be used only if you do...
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