Skip to content

Conversation

@tseaver
Copy link
Contributor

@tseaver tseaver commented Aug 12, 2015

Add support for jobs loading table data from CloudStorage files.

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

dhermes commented Aug 12, 2015

Does this have a diffbase?

@tseaver
Copy link
Contributor Author

tseaver commented Aug 12, 2015

Does this have a diffbase?

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

@tseaver tseaver mentioned this pull request Aug 12, 2015
@dhermes
Copy link
Contributor

dhermes commented Aug 12, 2015

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
Contributor

dhermes commented Aug 12, 2015

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

@tseaver
Copy link
Contributor Author

tseaver commented Aug 12, 2015

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

@dhermes
Copy link
Contributor

dhermes commented Aug 12, 2015

Thanks. Ping me when you push.

@tseaver
Copy link
Contributor Author

tseaver commented Aug 12, 2015

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

@dhermes
Copy link
Contributor

dhermes commented Aug 12, 2015

This thing is all ready to review?

@tseaver tseaver 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
Contributor Author

tseaver commented Aug 13, 2015

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

@tseaver tseaver 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
Contributor Author

tseaver commented Aug 13, 2015

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

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.

tseaver added 14 commits August 17, 2015 16:24
Builds an instance of 'job.LoadFromStorageJob'.
- 'table.Table._parse_schema_resource' -> 'table._parse_schema_resource' - 'table.Table._build_schema_resource' -> 'table._build_schema_resource'
Found while attempting to add a system test for the 'load from storage' case.
Users who want to avoid tripping over string literal mismatches can use class constants instead. Addresses: https://github.com/GoogleCloudPlatform/gcloud-python/pull/1056/files#r37029533
- 'Client.load_from_storage' -> 'Client.load_table_from_storage'. - 'job.LoadFromStorageJob' -> 'job.LoadTableFromStorageJob'. Addresses: https://github.com/GoogleCloudPlatform/gcloud-python/pull/1056/files#r37120652
@googlebot googlebot 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
Contributor Author

tseaver commented Aug 17, 2015

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
Contributor

dhermes commented Aug 17, 2015

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

>>> import enum >>> >>> class RedBlue(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) ... except ValueError as exc: ... print(repr(exc)) ... print('%s was not validated' % (to_validate,)) ... ValueError('GREEN is not a valid RedBlue',) GREEN was not validated
@tseaver
Copy link
Contributor Author

tseaver commented Aug 17, 2015

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
Contributor

dhermes commented Aug 17, 2015

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
Contributor

dhermes commented Aug 17, 2015

@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:master Aug 17, 2015
@tseaver tseaver deleted the bigquery-jobs_load_from_storage branch August 17, 2015 22:34
@tseaver tseaver mentioned this pull request Aug 18, 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
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 BigQuery API. cla: yes This human has signed the Contributor License Agreement.

3 participants