0

Is there a way to pass meta data/attributes between PTransforms? This information is not part of a element, but should be accessible when processing elements. I have a constraint that this information cannot be passed in as a constructor argument.

1 Answer 1

2

Why can't it be passed in as a constructor argument?

Is the value unknown until you get to a particular Transform? If so, the you could retrieve it as an additional output, and then input it everywhere it is needed as a side-input by using pvalue.

https://beam.apache.org/documentation/programming-guide/#additional-outputs

https://beam.apache.org/documentation/programming-guide/#side-inputs

https://beam.apache.org/releases/pydoc/2.8.0/apache_beam.pvalue.html#apache_beam.pvalue.AsSingleton

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.