amaliujia commented on a change in pull request #13771:
URL: https://github.com/apache/beam/pull/13771#discussion_r580780423
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryHelpers.java
##########
@@ -411,6 +411,21 @@ public static TableReference parseTableSpec(String
tableSpec) {
return
ref.setDatasetId(match.group("DATASET")).setTableId(match.group("TABLE"));
}
+ public static TableReference parseTableUrn(String tableUrn) {
+ Matcher match = BigQueryIO.TABLE_URN_SPEC.matcher(tableUrn);
+ if (!match.matches()) {
+ throw new IllegalArgumentException(
+ "Table reference is not in
projects/[project_id]/datasets/[dataset_id]/tables/[table_id] "
Review comment:
+1. My impression is that the BQ table naming convention is
`project:dataset_name.table_name`? Though I did a quick search and didn't find
the exact BQ naming convention.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]