Skip to content

test: add code snippets for loading data from BigQuery Job #154

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

Merged
merged 9 commits into from
Oct 31, 2023

Conversation

ashleyxuu
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@ashleyxuu ashleyxuu requested a review from tswast October 27, 2023 17:06
@ashleyxuu ashleyxuu requested review from a team as code owners October 27, 2023 17:06
@ashleyxuu ashleyxuu requested a review from rsamborski October 27, 2023 17:06
@snippet-bot
Copy link

snippet-bot bot commented Oct 27, 2023

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Oct 27, 2023
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Please investigate test failure.

=================================== FAILURES ===================================
_____________ test_bigquery_dataframes_load_data_from_bigquery_job _____________

    def test_bigquery_dataframes_load_data_from_bigquery_job():
        import bigframes.pandas as bpd
    
>       bpd.options.bigquery.project = "bigframes-dev"

[samples/snippets/load_data_from_biquery_job_test.py:19](https://cs.corp.google.com/piper///depot/google3/samples/snippets/load_data_from_biquery_job_test.py?l=19): 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <bigframes._config.bigquery_options.BigQueryOptions object at 0x7f000edb9a30>
value = 'bigframes-dev'

    @project.setter
    def project(self, value: Optional[str]):
        if self._session_started and self._project != value:
>           raise ValueError(SESSION_STARTED_MESSAGE.format(attribute="project"))
E           ValueError: Cannot change 'project' once a session has started. Call bigframes.pandas.close_session() first, if you are using the bigframes.pandas API.

[bigframes/_config/bigquery_options.py:100](https://cs.corp.google.com/piper///depot/google3/bigframes/_config/bigquery_options.py?l=100): ValueError
=============================== warnings summary ===============================

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Oct 30, 2023
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Love it!

Edit: Oops. Noticed one issue.

shobsi and others added 2 commits October 30, 2023 21:41
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes b/297502513 🦕
@ashleyxuu ashleyxuu requested a review from a team as a code owner October 30, 2023 21:41
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

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

Love it!

@ashleyxuu ashleyxuu merged commit cfebfaa into main Oct 31, 2023
@ashleyxuu ashleyxuu deleted the b307728748-code-snippets-query-results branch October 31, 2023 17:54
orrbradford pushed a commit that referenced this pull request Oct 31, 2023
* test: add code snippets for loading data from BigQuery Job

* fix: address the comments

* fix: fix the broken test

* use BigQuery Client library to get the job_id

* feat: Implement operator `@` for `DataFrame.dot` (#139)

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes b/297502513 🦕

* fix: fix the comments

---------

Co-authored-by: Shobhit Singh <shobs@google.com>
ashleyxuu added a commit that referenced this pull request Nov 1, 2023
* test: add code snippets for loading data from BigQuery Job

* fix: address the comments

* fix: fix the broken test

* use BigQuery Client library to get the job_id

* feat: Implement operator `@` for `DataFrame.dot` (#139)

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://togithub.com/googleapis/python-bigquery-dataframes/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [ ] Code coverage does not decrease (if any source code was changed)
- [ ] Appropriate docs were updated (if necessary)

Fixes b/297502513 🦕

* fix: fix the comments

---------

Co-authored-by: Shobhit Singh <shobs@google.com>
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 googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants