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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: created samples for load table and create table from schema file #1436

Merged
merged 5 commits into from
Dec 13, 2022

Conversation

Mattix23
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)

Towards #1069 🦕

@Mattix23 Mattix23 requested a review from a team December 12, 2022 16:56
@Mattix23 Mattix23 requested review from a team as code owners December 12, 2022 16:56
@snippet-bot
Copy link

snippet-bot bot commented Dec 12, 2022

Here is the summary of changes.

You are about to add 4 region tags.

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: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. samples Issues that are directly related to samples. labels Dec 12, 2022
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.

@Mattix23 @thejaredchapman We are getting some type checking failures. I've made some suggested edits that might fix this.

nox > Running session mypy_samples
nox > Creating virtual environment (virtualenv) using python3.8 in .nox/mypy_samples
nox > python -m pip install -e '.[all]'
nox > python -m pip install ipython pytest
nox > python -m pip install mypy==0.910
nox > python -m pip install types-mock types-pytz
nox > python -m pip install typing-extensions
nox > mypy --config-file /tmpfs/src/github/python-bigquery/samples/mypy.ini --no-incremental samples/
samples/snippets/load_table_schema_from_json.py:18: error: Function is missing a return type annotation
samples/snippets/load_table_schema_from_json.py:37: error: Incompatible types in assignment (expression has type "Path", variable has type "str")
samples/snippets/create_table_schema_from_json.py:18: error: Function is missing a return type annotation
samples/snippets/create_table_schema_from_json.py:34: error: Incompatible types in assignment (expression has type "Path", variable has type "str")
Found 4 errors in 2 files (checked 212 source files)
nox > Command mypy --config-file /tmpfs/src/github/python-bigquery/samples/mypy.ini --no-incremental samples/ failed with exit code 1
nox > Session mypy_samples failed.

samples/snippets/create_table_schema_from_json.py Outdated Show resolved Hide resolved
samples/snippets/load_table_schema_from_json.py Outdated Show resolved Hide resolved
samples/snippets/load_table_schema_from_json.py Outdated Show resolved Hide resolved
samples/snippets/create_table_schema_from_json.py Outdated Show resolved Hide resolved
Co-authored-by: Tim Swast <swast@google.com>
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.

One minor change, otherwise looking good!

samples/snippets/create_table_schema_from_json.py Outdated Show resolved Hide resolved
@tswast tswast enabled auto-merge (squash) December 13, 2022 22:34
@tswast tswast merged commit 8ad2e5b into main Dec 13, 2022
@tswast tswast deleted the issue1069-mtorresjr branch December 13, 2022 22:57
abdelmegahedgoogle pushed a commit to abdelmegahedgoogle/python-bigquery that referenced this pull request Apr 17, 2023
googleapis#1436)

* docs: created samples for load table and create table from schema file

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Apply suggestions from code review

Co-authored-by: Tim Swast <swast@google.com>

* Update samples/snippets/create_table_schema_from_json.py

Co-authored-by: Tim Swast <swast@google.com>

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Tim Swast <swast@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 API. samples Issues that are directly related to samples. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants