-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
BigQuery: Add support of the project ID with org prefix to the Table.from_string() method #9161
BigQuery: Add support of the project ID with org prefix to the Table.from_string() method #9161
Conversation
* '_parse_id' method renamed to '_split_id' * switched to 're.groups' implementation instead of partly grouping
flake8 fixed
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.
The PR fixes the reported issue. 👍
There is one docstring missing, and the regex pattern might need a change, please check the comment if it applies.
BTW, it would probably be useful to add another test case for tables with an optional partition suffix, e.g. "example.com:project_id.dataset_id.table_id$20190903"
.
* added the docstring for the '_split_id' method
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.
Under the assumption that we do not want to handle all possible cases such as too long ID parts, etc., these changes look good to me. 👍
…from_string() method (googleapis#9161) * add prefix support * Update _helpers.py * consolidate the regex * update split_id method * '_parse_id' method renamed to '_split_id' * switched to 're.groups' implementation instead of partly grouping * Update dataset.py flake8 fixed * Update _helpers.py * added the docstring for the '_split_id' method * fix lint failure
…from_string() method (googleapis#9161) * add prefix support * Update _helpers.py * consolidate the regex * update split_id method * '_parse_id' method renamed to '_split_id' * switched to 're.groups' implementation instead of partly grouping * Update dataset.py flake8 fixed * Update _helpers.py * added the docstring for the '_split_id' method * fix lint failure
ID splitting was moved to a separate method to avoid code duplication.
Dataset
file changed to the new implementation.Closes: #7827