8000 BigQuery: Add load_table_from_json() method to BQ client by plamut · Pull Request #9076 · googleapis/google-cloud-python · GitHub
[go: up one dir, main page]

Skip to content

Conversation

plamut
Copy link
Contributor
@plamut plamut commented Aug 22, 2019

Closes #4553.

This PR adds a helper client method load_table_from_json(). Is supersedes #9070, because GitHub did not detect updates in my topic branch.

How to test

Check that the method is similar to e.g. client.load_table_from_dataframe() and in line with the requirements.

P.S.: I will address the last issue comment separately once this is approved (replacing the _add_rows() helper in system tests is a separate refactoring task IMO).

@plamut plamut added the api: bigquery Issues related to the BigQuery API. label Aug 22, 2019
@plamut plamut requested review from tswast and a team August 22, 2019 10:09
@plamut
Copy link
Contributor Author
plamut commented Aug 22, 2019

Linking a comment thread for visibility (a question about deep-copying a LoadJobConfig instance).

#9070 (comment)

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 22, 2019
plamut added 2 commits August 22, 2019 12:21
The load_table_from_json() should not directly change the job config
passed in as an argument.
@plamut plamut force-pushed the iss-4553 branch 4 times, most recently from e596212 to 919d30e Compare August 22, 2019 11:06
@plamut plamut requested a review from tswast August 22, 2019 19:01
@plamut plamut merged commit ee2a67f into googleapis:master Aug 22, 2019
@plamut plamut deleted the iss-4553 branch August 22, 2019 20:02
HemangChothani pushed a commit to HemangChothani/google-cloud-python that referenced this pull request Aug 29, 2019
…9076)

* Add load_table_from_json() method to BQ client

* Manipulate a copy of the job config if provided

The load_table_from_json() should not directly change the job config
passed in as an argument.

* Enable schema autodetect if no explicit schema

* Cover the path of schema provided in unit tests

* Improve tests readability and harden assertions
emar-kar pushed a commit to MaxxleLLC/google-cloud-python that referenced this pull request Sep 18, 2019
…9076)

* Add load_table_from_json() method to BQ client

* Manipulate a copy of the job config if provided

The load_table_from_json() should not directly change the job config
passed in as an argument.

* Enable schema autodetect if no explicit schema

* Cover the path of schema provided in unit tests

* Improve tests readability and harden assertions
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add functions equivalent to create_rows and create_rows_json that create a table for you using a load job
3 participants
0