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

Added support for schema auto-detection feature in the job method `Lo… #3648

Merged
merged 4 commits into from
Jul 28, 2017
Merged

Added support for schema auto-detection feature in the job method `Lo… #3648

merged 4 commits into from
Jul 28, 2017

Conversation

WillianFuks
Copy link
Contributor

@WillianFuks WillianFuks commented Jul 21, 2017

Hello,

I did some implementation adding support for the feature "schema auto-detection" for BigQuery in the job method LoadTableFromStorageJob.

Not sure if got it right, please let me know what you think and I can fix whatever issues you may find.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 21, 2017
@dhermes dhermes added the api: bigquery Issues related to the BigQuery API. label Jul 21, 2017
@dhermes
Copy link
Contributor

dhermes commented Jul 21, 2017

I'll defer to @tswast or @jonparrott on review here. (In particular, review of the surface vs. review of the code itself.)

@theacodes
Copy link
Contributor

@tswast is out-of-office. This surface seems reasonable to me.

@@ -506,6 +529,11 @@ def output_rows(self):
https://cloud.google.com/bigquery/docs/reference/rest/v2/jobs#configuration.load.allowQuotedNewlines
"""

autodetect_schema = AutoDetectSchema('autodetect_schema', bool)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tswast
Copy link
Contributor

tswast commented Jul 26, 2017

@dhermes could you do a review pass, too, and merge if it looks okay to you?

@tseaver tseaver self-assigned this Jul 26, 2017
@dhermes
Copy link
Contributor

dhermes commented Jul 26, 2017

Working on it now

@dhermes
Copy link
Contributor

dhermes commented Jul 26, 2017

@tseaver I noticed you assigned yourself, don't want to cross paths here but I've been actually in a local checkout of the code for about 15 minutes.

@tseaver tseaver assigned dhermes and unassigned tseaver Jul 26, 2017
@tseaver
Copy link
Contributor

tseaver commented Jul 26, 2017

@dhermes Go ahead!

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Jul 26, 2017
@dhermes
Copy link
Contributor

dhermes commented Jul 26, 2017

@WillianFuks I just sent a commit into this PR with a few style tweaks (thanks for adhering to the existing style BTW).

I did have a question about your expectation of the _configuration value in the schema @property, but I'll ask it on the code.

else:
if not all(isinstance(field, SchemaField) for field in value):
raise ValueError('Schema items must be fields')
if self._configuration is not None and self.autodetect:

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@WillianFuks
Copy link
Contributor Author

Hi @dhermes , just to confirm, is everything ok in this PR? I saw this message from googlebot saying there's an issue with CLA, I wonder if I need to do something related.

Thanks :)!

@dhermes
Copy link
Contributor

dhermes commented Jul 28, 2017

@WillianFuks The CLA bot gets confused when there are commits from multiple authors, sorry for that.

As for "is everything OK", I seem to recall that I was waiting on your for response on something, but I can't find any comment to that effect.

@dhermes
Copy link
Contributor

dhermes commented Jul 28, 2017

I think the issue may just be the failed docs build. I'll rebase and hopefully it'll have been fixed by #3683

WillianFuks and others added 4 commits July 28, 2017 09:59
Most importantly, updating the `getattr(self, '_configuration', None)`
to just access normally (the `schema` `@property` was being called
in the constructor **before** the `_configuration` attribute was
set).
@dhermes dhermes merged commit b94a326 into googleapis:master Jul 28, 2017
@WillianFuks WillianFuks deleted the add-bigquery-autodetect-schema-LoadTableFromStorageJob branch July 29, 2017 01:29
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 21, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
landrito pushed a commit to landrito/google-cloud-python that referenced this pull request Aug 22, 2017
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: no This human has *not* signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants