TheMichaelHu commented on code in PR #22452:
URL: https://github.com/apache/beam/pull/22452#discussion_r930416017
##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -254,11 +258,11 @@ def parse_table_reference(table, dataset=None,
project=None):
# table argument will contain a full table reference instead of just a
# table name.
if dataset is None:
- regex = re.compile(
- r'''^((?P<project>.+):)?(?P<dataset>\w+)\.
- (?P<table>[-\w\$]+(\s+\-*\w+)*)$''',
- re.X)
- match = regex.match(table)
+ pattern = (
+ f'(?P<project>{_PROJECT_PATTERN})'
+ f'[:\\.](?P<dataset>{_DATASET_PATTERN})'
+ f'[:\\.](?P<table>{_TABLE_PATTERN})')
Review Comment:
Nope, it only allows `.` for table paths. For this not to be a breaking
change we'll need to continue supporting `:` after the project. I have no
strong opinions about allowing `:` after the dataset, seemed more consistant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]