TheMichaelHu commented on code in PR #22452:
URL: https://github.com/apache/beam/pull/22452#discussion_r934678068
##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -101,6 +101,10 @@
# Timeout for a BQ streaming insert RPC. Set to a maximum of 2 minutes.
BQ_STREAMING_INSERT_TIMEOUT_SEC = 120
+_PROJECT_PATTERN = r'([a-z0-9.-]+:)?[a-z][a-z0-9-]{4,28}[a-z0-9]'
Review Comment:
It's the regex we use for the AutoML Tables product. `([a-z0-9.-]+:)?`
handles domain-scoped projects, and `[a-z][a-z0-9-]{4,28}[a-z0-9]` is the most
straightforward way to satisfy
https://cloud.google.com/resource-manager/docs/creating-managing-projects#before_you_begin:
- Must be 6 to 30 characters in length.
- Can only contain lowercase letters, numbers, and hyphens.
- Must start with a letter.
- Cannot end with a hyphen.
btw, I'm okay with keeping the project id regex as relaxed is it was before.
Main goal of this PR was to support all valid table names.
--
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]