-
Notifications
You must be signed in to change notification settings - Fork 130
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
feat: Pandas and GeoPandas samples #235
Conversation
This reverts commit 2e1fc9a. README generation is broke, googleapis/synthtool#867 so we'll punt for now.
…-sqlalchemy into pandas-samples
Here is the summary of changes. You are about to add 2 region tags.
This comment is generated by snippet-bot.
|
I added a "do not merge" tag, because I'm not sure we want people to do this. However, I'd kind of like to know how to do samples, and would like some feedback. :) |
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.
These look good! I think we just need to adjust the tags so that the snippet bot is happy.
|
||
|
||
def read_geographic_data_into_pandas_using_read_sql() -> None: | ||
# [START sqlalchemy_bigquery_read_postgis] |
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.
Because of the way we track samples, the tag needs to start with the API name.
How about bigquery_geopandas_sqlalchemy
?
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.
fixed
"EPSG:4326", | ||
) | ||
|
||
# Don't wrap pr elide: |
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.
What does this comment mean? I'm not familiar with pr elide
in this context.
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 betting it is really or elide:
.
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.
Yup, fixed
samples/snippets/pandas_read_sql.py
Outdated
|
||
|
||
def read_data_into_pandas_using_read_sql() -> None: | ||
# [START sqlalchemy_bigquery_read_sql] |
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.
Needs to start with bigquery
, how about bigquery_pandas_sqlalchemy
?
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.
fixed
Kokoro failure looks like a flake by the backend. I learned that the backend can take as long as 4 minutes to fail on some API requests, so hopefully googleapis/python-bigquery#859 helps with this.
In the meantime, I'll manually trigger the Kokoro job to rebuild. |
Yup, I figured. ...
Cool, but remember the goal of this PR, at least for me, was to get a grip on samples. :) It's been super helpful, but I don't intend to merge it. IMO, these samples are counter productive, because, as you've noted, the BQ python libary's My thought is when |
I've merged this into the geography branch and deleted these two examples (and added a geography sample). If you really want these samples, let me know and I'll reopen this. |
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:
Fixes #231 🦕