Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(bigquery): add create job method#32

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@HemangChothani
Copy link
Contributor

Fixes#14

@googlebotgooglebot added the cla: yesThis human has signed the Contributor License Agreement. labelFeb 7, 2020
Copy link
Contributor

@plamutplamut left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I have a few questions on handling thejob_config input argument.

Another is a general question how to keep this factory method in sync with the*Job classes - I presume it should be a very rare occurrence of a new job type being added/removed?

Edit:
One more thing - the ticket description contains three checklist items, while this PR only implements the first of them - is there anything else this will be added?
If not let's change the PR issue link in the description to"Towards#14" or something similar, so that merging the PR will not close the issue just yet.

job_config
)
destination=TableReference.from_api_repr(
job_config["load"]["destinationTable"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Just a thought - what if the input dict is incorrectly structured? The user might then face rather uninformativeKeyErrors.

It seems that it would make sense to use_get_sub_prop() in all potentially risky cases?

source,destination_uris,job_config=extract_job_config,retry=retry
)
elif"query"injob_config:
deljob_config["query"]["destinationTable"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This will modify thedict passed in, which is probably undesired? IIRC there was an issue back then that addressed a very similar case by operating on a copy of the input argument.

@HemangChothaniHemangChothani added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelFeb 12, 2020
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelFeb 12, 2020
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment@googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️Googlers:Go here for more info.

@googlebotgooglebot added cla: noThis human has *not* signed the Contributor License Agreement. and removed cla: yesThis human has signed the Contributor License Agreement. labelsFeb 12, 2020
@HemangChothaniHemangChothaniforce-pushed thebigquery_add_create_job_method branch from37e55cb toad758aaCompareFebruary 12, 2020 09:16
@googlebot
Copy link

CLAs look good, thanks!

ℹ️Googlers:Go here for more info.

@googlebotgooglebot added cla: yesThis human has signed the Contributor License Agreement. and removed cla: noThis human has *not* signed the Contributor License Agreement. labelsFeb 12, 2020
Copy link
Contributor

@plamutplamut left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Looks good, awaiting just the feedback on whether or not we are fine with potentially modifying an input argument.

)
elif"query"injob_config:
deljob_config["query"]["destinationTable"]
_del_sub_prop(job_config,["query","destinationTable"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This will still potentially modify the input argument in-place, do we mind? (cc:@tswast )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Let's not do that if at all possible. Maybe make a copy before calling_del_sub_prop?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@plamut ,@tswast Ok, may i docopy_config = copy.deepcopy(job_config) before calling_del_sub_prop ?

If i considerclear destination_table if it was a query job statement which mentioned in issue's description, need to modify the input argument.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@HemangChothani Creating a copy and operating on the latter sounds good, yes.

If i considerclear destination_table if it was a query job statement which mentioned in issue's description, need to modify the input argument.

If I understood the ticket description correctly, it is not clear when a client library should clear the destination table property. But if we do clear it (as is the case withquery jobs), it is safer to do it in a config copy, because users normally don't expect that their input parameter could be modified.

@tswasttswast requested review fromshollyman and removed request fortswastMarch 3, 2020 17:12
@plamutplamut merged commit2abdef8 intogoogleapis:masterMar 26, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast left review comments

@shollymanshollymanAwaiting requested review from shollyman

+1 more reviewer

@plamutplamutplamut approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

BigQuery: addcreate_job method that takes any kind of job config (and public configuration property to job classes)

5 participants

@HemangChothani@googlebot@tswast@plamut@yoshi-kokoro

[8]ページ先頭

©2009-2025 Movatter.jp