[
https://issues.apache.org/jira/browse/BEAM-12145?focusedWorklogId=580426&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-580426
]
ASF GitHub Bot logged work on BEAM-12145:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Apr/21 00:08
Start Date: 10/Apr/21 00:08
Worklog Time Spent: 10m
Work Description: chamikaramj commented on a change in pull request
#14502:
URL: https://github.com/apache/beam/pull/14502#discussion_r610957549
##########
File path: sdks/python/apache_beam/pipeline.py
##########
@@ -1416,10 +1418,15 @@ def get_or_assign(self, obj=None, obj_type=None,
label=None):
return self._obj_to_id[obj]
+ def _normalize(self, str_value):
+ str_value = unicodedata.normalize('NFC', str_value)
+ return re.sub(r'[^a-zA-Z0-9-_]+', '-', str_value)
Review comment:
I'm not 100% sure what exactly to use here. NFC and NFD seems to be the
two main options and NFC seems to be the shorter of the two so I chose that:
https://docs.python.org/3.6/library/unicodedata.html#unicodedata.normalize
Also, this will only apply to non-ASCII characters IIUC.
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 580426)
Time Spent: 2h 20m (was: 2h 10m)
> Normalize transform IDs generated by SDKs
> -----------------------------------------
>
> Key: BEAM-12145
> URL: https://issues.apache.org/jira/browse/BEAM-12145
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Chamikara Madhusanka Jayalath
> Assignee: Chamikara Madhusanka Jayalath
> Priority: P2
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> Transform IDs generated by the SDK may be used by runners to identify
> pipeline steps hence its preferable to keep them normalized, size limited,
> and unique.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)