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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Updates query to query and wait in client_query_w_positional_params.py #1786

Merged
merged 5 commits into from Jan 25, 2024

Conversation

DevStephanie
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> 馃

@DevStephanie DevStephanie requested review from a team as code owners January 17, 2024 04:12
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Jan 17, 2024
Copy link

conventional-commit-lint-gcf bot commented Jan 17, 2024

馃 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Jan 17, 2024
@kiraksi kiraksi added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 17, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 17, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2024
@kiraksi kiraksi requested review from tswast and removed request for parthea and GaoleMeng January 17, 2024 11:14
@kiraksi kiraksi added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 17, 2024
@chalmerlowe chalmerlowe added the type: docs Improvement to the documentation for an API. label Jan 22, 2024
@kiraksi kiraksi self-requested a review January 25, 2024 09:47
@@ -35,7 +35,9 @@ def client_query_w_positional_params() -> None:
bigquery.ScalarQueryParameter(None, "INT64", 250),
]
)
query_job = client.query(query, job_config=job_config) # Make an API request.
query_job = client.query_and_wait(
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename this variable, as the return value is no longer a QueryJob object. Instead it is a RowIterator object. "rows" or "results" could be a good name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sounds good. Will correct that now.

query_job = client.query(query, job_config=job_config) # Make an API request.
results = client.query_and_wait(
query, job_config=job_config
) # Make an API request.

for row in query_job:
Copy link
Contributor

Choose a reason for hiding this comment

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

This line needs to be updated too. The query_job variable doesn't exist anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, will correct now.

Copy link
Contributor

@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!

@tswast tswast added kokoro:run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Jan 25, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 25, 2024
@tswast tswast enabled auto-merge (squash) January 25, 2024 20:01
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 25, 2024
@tswast tswast merged commit 410f71e into googleapis:main Jan 25, 2024
19 of 20 checks passed
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 API. size: xs Pull request size is extra small. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants