mravi commented on code in PR #33208:
URL: https://github.com/apache/beam/pull/33208#discussion_r1870370346


##########
sdks/python/apache_beam/yaml/yaml_transform.py:
##########
@@ -955,10 +955,37 @@ def preprocess_languages(spec):
     else:
       return spec
 
+  def validate_transform_references(spec):
+    if 'transforms' not in spec:
+      return spec
+
+    for transform in spec['transforms']:
+      name = transform.get('name')
+      inputs = transform.get('input')
+      if name is None or inputs is None:

Review Comment:
   I was thinking of validating input against both name and type to address 
cases like below.  
   
   ```
   type: composite
       transforms:
         - type: Create
           name: CreateData
           config:
               elements: [0, 1, 3, 4]
           input: Create
         - type: PyMap
           name: PyMap
           config:
               fn: "lambda row: row.element * row.element"
           input: Create
       output: PyMap
   ```
   
   A clarification : Can a transform's input reference another Named transform 
by type ? 
   



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

Reply via email to