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

Fix supports_multivalues_insert feature name #224

Closed
wants to merge 1 commit into from
Closed

Fix supports_multivalues_insert feature name #224

wants to merge 1 commit into from

Conversation

devbis
Copy link

@devbis devbis commented Jul 22, 2021

This PR fixes multivalues insertion feature that was broken due to a typo

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

This PR fixes multivalues insertion feature that was broken due to a typo
@devbis devbis requested a review from a team as a code owner July 22, 2021 15:48
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. label Jul 22, 2021
@google-cla
Copy link

google-cla bot commented Jul 22, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no This human has *not* signed the Contributor License Agreement. label Jul 22, 2021
@jimfulton
Copy link
Contributor

Thanks. It's a shame there wasn't a test to catch this in the first place.

Can you think of a test for this? Maybe looking at the way inserts get generated?

If not, I will. :)

@devbis
Copy link
Author

devbis commented Jul 23, 2021

Hey @jimfulton, I would appreciate your help in adding tests.
unfortunately, I don't have enough time at the moment to dive into one more library. Good, that this problem can be easily monkey-patched.
Feel free to close the PR and submit changes under your account as well.
It will help me to avoid cla signing, etc.

@jimfulton
Copy link
Contributor

OK. Created #226 to track.

@jimfulton jimfulton closed this Jul 23, 2021
@jimfulton
Copy link
Contributor

@devbis this doesn't do what I guessed it did. :)

What motivated you to do this -- what breaks without it?

@jimfulton
Copy link
Contributor

Reopening to see if any tests are affected.

@devbis
Copy link
Author

devbis commented Aug 19, 2021

@devbis this doesn't do what I guessed it did. :)

What motivated you to do this -- what breaks without it?

Sorry for the delay.
I'm trying to bulk insert with the following code:

session.execute(insert(model).values(list_of_dicts))

I want to make the following insert in SQL

INSERT INTO table VALUES (...), (...), .... (...);

It takes the same time as a single insertion, but I can uploads many items at once.

And without this feature enabled SQLalchemy doesn't allow to do it.

@jimfulton
Copy link
Contributor

Thanks. Hm, that's what I thought too... I'll look some more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. cla: no This human has *not* signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants