Skip to content

Jobs: load from storage - #1056

Merged
tseaver merged 16 commits into
googleapis:masterfrom
tseaver:bigquery-jobs_load_from_storage
Aug 17, 2015
Merged

Jobs: load from storage#1056
tseaver merged 16 commits into
googleapis:masterfrom
tseaver:bigquery-jobs_load_from_storage

Conversation

@tseaver

Copy link
Copy Markdown
Contributor

Add support for jobs loading table data from CloudStorage files.

@tseavertseaver added the api: bigquery Issues related to the BigQuery API. label Aug 12, 2015
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 12, 2015
@dhermes

Copy link
Copy Markdown
Contributor

Does this have a diffbase?

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Does this have a diffbase?

Nope -- I rebased it before pushing. Too big?

@tseavertseaver mentioned this pull request Aug 12, 2015
@dhermes

Copy link
Copy Markdown
Contributor

I just wasn't sure since there were 8 commits. Also, you're failing pep8 (that one runs fast, pylint is the slow one).

@dhermes

Copy link
Copy Markdown
Contributor

Also ISTM a rebase won't feel very good due to the merging of #1051.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

I will fix it up (both the pep8 and the date stuff) and re-push.

@dhermes

Copy link
Copy Markdown
Contributor

Thanks. Ping me when you push.

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Ugh! The pep8 fix was trivial, but working around the pylint 'too-many-branches' failures made me grind my teeth (4c14890)

@dhermes

Copy link
Copy Markdown
Contributor

This thing is all ready to review?

@tseavertseaver added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 13, 2015
@tseaver

Copy link
Copy Markdown
ContributorAuthor

Hold off a bit -- I'm adding a system test for the "load from cloud storage" case, and it is failing.

@tseavertseaver removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 13, 2015
@tseaver

Copy link
Copy Markdown
ContributorAuthor

@dhermes OK, got the system test added and passing.

Comment threadgcloud/bigquery/client.py Outdated

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@googlebotgooglebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Aug 17, 2015
@tseaver

Copy link
Copy Markdown
ContributorAuthor

Why not just take the jump and use enum34?

I didn't want to eat the extra dependency. We have #1031 to track the idea, though.

@dhermes

Copy link
Copy Markdown
Contributor

Why not? It's lightweight and hopefully most users already have it

>>>importenum>>>>>>classRedBlue(enum.Enum):
... RED='RED'
... BLUE='BLUE'
... >>>>>>to_validate='RED'>>>rb=RedBlue(to_validate)
>>>print(rb)
RedBlue.RED>>>print(rb.value)
RED>>>>>>to_validate='GREEN'>>>try:
... RedBlue(to_validate)
... exceptValueErrorasexc:
... print(repr(exc))
... print('%s was not validated'% (to_validate,))
... ValueError('GREEN is not a valid RedBlue',)
GREENwasnotvalidated

@tseaver

Copy link
Copy Markdown
ContributorAuthor

Most users are on Python2, and likely won't have it unless some other library has pushed them to add it. Again, we can clean up here (and in the other APIs) when we address #1031.

@dhermes

Copy link
Copy Markdown
Contributor

LGTM. I really hope the follow-up commits can spread out some of the pain here.


I was saying that most Python 2 only users would have lots of libraries installed that straddled Py2 and Py3, and hence would have a good chance that one of them used enum34. (I could've been clearer there.)

@dhermes

Copy link
Copy Markdown
Contributor

@tseaver Please ping me on anything that will get rebased after this goes in.

tseaver added a commit that referenced this pull request Aug 17, 2015
@tseaver
tseaver merged commit cf93465 into googleapis:masterAug 17, 2015
@tseaver
tseaver deleted the bigquery-jobs_load_from_storage branch August 17, 2015 22:34
@tseavertseaver mentioned this pull request Aug 18, 2015
@dhermesdhermes mentioned this pull request Sep 30, 2015
parthea pushed a commit that referenced this pull request Nov 24, 2025
Fragment tests are defined by a small proto file describing an API
surface with characteristics such that it is desirable to test the
generated surface for correctness or to prevent regressions.
As part of a fragment test, the generator is run on a fragment to
create a GAPIC library for the fragment. The generated unit tests
for the fragment are then executed to test the surface.
parthea pushed a commit that referenced this pull request Nov 24, 2025
Fixes#1056.
Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
parthea pushed a commit that referenced this pull request Mar 6, 2026
* chore: update Java and Python dependencies
PiperOrigin-RevId: 408420890
Source-Link: googleapis/googleapis@2921f9f
Source-Link: googleapis/googleapis-gen@6598ca8
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9
* 🦉 Updates from OwlBot
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
…dding interceptors support for testing (#1056)
* feat: Fixing and refactoring transaction retry logic in dbapi. Also adding interceptors support for testing
* Comments incorporated and changes for also storing Cursor object with the statements details added for retry
* Some refactoring of transaction_helper.py and maintaining state of rows update count for batch dml in cursor
* Small fix
* Maintaining a map from cursor to last statement added in transaction_helper.py
* Rolling back the transaction when Aborted exception is thrown from interceptor
* Small change
* Disabling a test for emulator run
* Reformatting
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigqueryIssues related to the BigQuery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@tseaver@dhermes@googlebot