You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/08/01 15:45:47 UTC

[GitHub] [beam] TheMichaelHu commented on a diff in pull request #22452: Update BigQuery URI validation to allow more valid URIs through

TheMichaelHu commented on code in PR #22452:
URL: https://github.com/apache/beam/pull/22452#discussion_r934674008


##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -254,11 +258,10 @@ 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})[:\\.])?'

Review Comment:
   dot is actually the only accepted delimiter after project, colon is invalid. https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#table_path
   
   I'm keeping colon as valid here for backwards compatibility.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org