ajamato commented on a change in pull request #12762:
URL: https://github.com/apache/beam/pull/12762#discussion_r489745304



##########
File path: sdks/python/apache_beam/io/gcp/bigquery_io_metadata.py
##########
@@ -28,6 +28,11 @@
 _VALID_CLOUD_LABEL_PATTERN = re.compile(r'^[a-z0-9\_\-]{1,63}$')
 
 
+def _sanitize_value(value):
+  """Sanitizes a value into a valid BigQuery label value."""
+  return re.sub('[^\w-]+', '', value.lower().replace('/', '-'))[0:63]

Review comment:
       Ah, just remembered that I checked in helpers in both python and java a 
python/apache_beam/io/gcp/bigquery_io_metadata.py 
   
   You may want to move the santize function to those files.
   _is_valid_cloud_label_value




----------------------------------------------------------------
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]


Reply via email to