GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs: add code samples for Jupyter/IPython magics by tswast · Pull Request #1013 · googleapis/python-bigquery

This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Conversation

@tswast

@tswast tswast commented Oct 11, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Follow-up to GoogleCloudPlatform/python-docs-samples#6889, which removed a BigQuery magics sample for using query parameters.

Note: jupyter_tutorial_test.py is a copy of what is in the samples/snippets
folder. Once the docs have been updated to point to this new version, we can
remove that copy and remove the Jupyter/IPython depedencencies from
samples/snippets/requirements.txt.

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)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast
docs: add code samples for Jupyter/IPython magics
367671a
Note: jupyter_tutorial_test.py is a copy of what is in the `samples/snippets`
folder. Once the docs have been updated to point to this new version, we can
remove that copy and remove the Jupyter/IPython depedencencies from
`samples/snippets/requirements.txt`.
@tswast
tswast requested review from a team and loferris October 11, 2021 15:38
@tswast
tswast requested a review from a team as a code owner October 11, 2021 15:38
@tswast
tswast requested a review from a team October 11, 2021 15:38
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Oct 11, 2021
@snippet-bot

snippet-bot Bot commented Oct 11, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 4 region tags.
  • docs/magics.rst:20, tag bigquery_jupyter_query
  • docs/magics.rst:27, tag bigquery_jupyter_query_params_scalars
  • samples/magics/query.py:25, tag bigquery_jupyter_query
  • samples/magics/query_params_scalars.py:25, tag bigquery_jupyter_query_params_scalars

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@product-auto-label product-auto-label Bot added api: bigquery Issues related to the googleapis/python-bigquery API. samples Issues that are directly related to samples. labels Oct 11, 2021
@tswast tswast mentioned this pull request Oct 11, 2021
fix: removes samples and tests for parameterized queries GoogleCloudPlatform/python-docs-samples#6889
Merged
tswast added 2 commits October 11, 2021 10:41
@tswast
revert redirect deletion
4eca7d5
@tswast
fix tests
97d17f7
tswast
tswast commented Oct 11, 2021
View reviewed changes
Comment thread samples/magics/jupyter_tutorial_test.py Outdated
@@ -0,0 +1,147 @@
# Copyright 2018 Google Inc. All Rights Reserved.

@tswast tswast Oct 11, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I'm aware that this uses the natality dataset, which I think is on our list to migrate away from, but this is just to move the sample into a different directory from here: https://github.com/googleapis/python-bigquery/blob/main/samples/snippets/jupyter_tutorial_test.py

Samples are used here: https://cloud.google.com/bigquery/docs/visualize-jupyter

Possible we'll want to make this a regular notebook instead and put it here: https://github.com/GoogleCloudPlatform/bigquery-notebooks

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@loferris loferris Oct 11, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think we can go ahead with existing samples using natality as long as we circle back to it eventually.

I think that this would be a good candidate for a notebook when we have the embedded notebook pipeline set up. (Possibly Q4.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tswast tswast Oct 11, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@loferris Perhaps I should remove this file from this PR? I was moving it to this directory mostly so I can cleanup the requirements.txt file in samples/snippets, but if we think we'll migrate this to a proper notebook soon-ish, then I can wait to clean that up until then.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@loferris loferris Oct 29, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think it's fine as is!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
loferris
loferris reviewed Oct 11, 2021
View reviewed changes

@loferris loferris left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Overall looks good, would love some context on writing a sample as a test file.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/magics/jupyter_tutorial_test.py Outdated
@@ -0,0 +1,147 @@
# Copyright 2018 Google Inc. All Rights Reserved.

@loferris loferris Oct 11, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think we can go ahead with existing samples using natality as long as we circle back to it eventually.

I think that this would be a good candidate for a notebook when we have the embedded notebook pipeline set up. (Possibly Q4.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread samples/magics/jupyter_tutorial_test.py Outdated
# limitations under the License.
"""All of the samples used in the Jupyter notebooks tutorial.

Written as a test to save on boilerplate, since this sample has to similate

@loferris loferris Oct 11, 2021

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This seems like a good workaround for this kind of doc, but I would be interested in converting to a notebook as writing a sample as a test seems counterintuitive to maintain and fairly different from other samples of this type.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tswast tswast Oct 11, 2021

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

+1 on eventually converting to a notebook and integrating into a notebook->docs pipeline

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

loferris reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@tswast
remove copy of jupyter_tutorial_test.py
8dbad0c
@tswast
tswast requested a review from loferris October 14, 2021 15:09
@tswast
Merge branch 'main' into magics-samples
cb1d753
@tswast

tswast commented Oct 15, 2021

Copy link
Copy Markdown
Contributor Author

@loferris Could you mark this as Approved if there are no other changes I should make?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JustinBeckwith
Merge branch 'main' into magics-samples
e28ce7e
loferris
loferris approved these changes Oct 29, 2021
View reviewed changes

@loferris loferris left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tswast
Merge branch 'main' into magics-samples
0cf327c
@tswast tswast added the automerge Merge the pull request once unit tests and other checks pass. label Oct 29, 2021
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 61141ee into googleapis:main Oct 29, 2021
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 29, 2021
gcf-merge-on-green Bot pushed a commit that referenced this pull request Nov 3, 2021
@release-please
chore: release 2.30.0 (#1039)
7c5fa8a
🤖 I have created a release \*beep\* \*boop\*
---
## [2.30.0](https://www.github.com/googleapis/python-bigquery/compare/v2.29.0...v2.30.0) (2021-11-03)


### Features

* accept TableListItem where TableReference is accepted ([#1016](https://www.github.com/googleapis/python-bigquery/issues/1016)) ([fe16adc](https://www.github.com/googleapis/python-bigquery/commit/fe16adc86a170d0992c32091b349b036f8b43884))
* support Python 3.10 ([#1043](https://www.github.com/googleapis/python-bigquery/issues/1043)) ([5bbb832](https://www.github.com/googleapis/python-bigquery/commit/5bbb832a83ebb66db4b5ee740cdfc53f4df8430b))


### Documentation

* add code samples for Jupyter/IPython magics ([#1013](https://www.github.com/googleapis/python-bigquery/issues/1013)) ([61141ee](https://www.github.com/googleapis/python-bigquery/commit/61141ee0634024ad261d1595c95cd14a896fb87e))
* **samples:** add create external table with hive partitioning  ([#1033](https://www.github.com/googleapis/python-bigquery/issues/1033)) ([d64f5b6](https://www.github.com/googleapis/python-bigquery/commit/d64f5b682854a2293244426316890df4ab1e079e))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
@tswast @abdelmegahedgoogle
docs: add code samples for Jupyter/IPython magics (googleapis#1013)
db966f7
Follow-up to GoogleCloudPlatform/python-docs-samples#6889, which removed a BigQuery magics sample for using query parameters.

Note: jupyter_tutorial_test.py is a copy of what is in the `samples/snippets`
folder. Once the docs have been updated to point to this new version, we can
remove that copy and remove the Jupyter/IPython depedencencies from
`samples/snippets/requirements.txt`.

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://github.com/googleapis/python-bigquery/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)
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
@release-please @abdelmegahedgoogle
chore: release 2.30.0 (googleapis#1039)
5bcff87
🤖 I have created a release \*beep\* \*boop\*
---
## [2.30.0](https://www.github.com/googleapis/python-bigquery/compare/v2.29.0...v2.30.0) (2021-11-03)


### Features

* accept TableListItem where TableReference is accepted ([googleapis#1016](https://www.github.com/googleapis/python-bigquery/issues/1016)) ([fe16adc](https://www.github.com/googleapis/python-bigquery/commit/fe16adc86a170d0992c32091b349b036f8b43884))
* support Python 3.10 ([googleapis#1043](https://www.github.com/googleapis/python-bigquery/issues/1043)) ([5bbb832](https://www.github.com/googleapis/python-bigquery/commit/5bbb832a83ebb66db4b5ee740cdfc53f4df8430b))


### Documentation

* add code samples for Jupyter/IPython magics ([googleapis#1013](https://www.github.com/googleapis/python-bigquery/issues/1013)) ([61141ee](https://www.github.com/googleapis/python-bigquery/commit/61141ee0634024ad261d1595c95cd14a896fb87e))
* **samples:** add create external table with hive partitioning  ([googleapis#1033](https://www.github.com/googleapis/python-bigquery/issues/1033)) ([d64f5b6](https://www.github.com/googleapis/python-bigquery/commit/d64f5b682854a2293244426316890df4ab1e079e))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@loferris loferris loferris approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@tswast @loferris @JustinBeckwith
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.