[ 
https://issues.apache.org/jira/browse/BEAM-6167?focusedWorklogId=172296&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-172296
 ]

ASF GitHub Bot logged work on BEAM-6167:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Dec/18 14:35
            Start Date: 05/Dec/18 14:35
    Worklog Time Spent: 10m 
      Work Description: lcaggio commented on a change in pull request #7193: 
[BEAM-6167] Add class ReadFromTextWithFilename (Python)
URL: https://github.com/apache/beam/pull/7193#discussion_r239089178
 
 

 ##########
 File path: sdks/python/apache_beam/io/textio.py
 ##########
 @@ -527,6 +533,61 @@ def expand(self, pvalue):
     return pvalue.pipeline | Read(self._source)
 
 
+class ReadFromTextWithFilename(PTransform):
 
 Review comment:
   This is definitely an option. I implemented it in this way because I found 
strage have a class that change the returned data type format based on an 
optional parameter. 
   
   In this way, it is more clear (and documented) that if I want to get the 
source filename, I will need to change the class **and** the way I handle 
elements in the following steps. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 172296)
    Time Spent: 0.5h  (was: 20m)

> Create a Class to read content of a file keeping track of the file path 
> (python)
> --------------------------------------------------------------------------------
>
>                 Key: BEAM-6167
>                 URL: https://issues.apache.org/jira/browse/BEAM-6167
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-ideas
>    Affects Versions: 2.8.0
>            Reporter: Lorenzo Caggioni
>            Assignee: Eugene Kirpichov
>            Priority: Minor
>             Fix For: Not applicable
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Add a class to read content of a file keeping track of the file path each 
> element come from.
> This is an improvement of the current python/apache_beam/io/textio.py



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to