Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait.on() in Python #21137

Closed
damccorm opened this issue Jun 4, 2022 · 2 comments
Closed

Wait.on() in Python #21137

damccorm opened this issue Jun 4, 2022 · 2 comments

Comments

@damccorm
Copy link
Contributor

damccorm commented Jun 4, 2022

Python has no feature corresponding to Wait.on() in Java.

I see many python transforms use SideInput manually to workaround this, but it would be easy to make python pipelines if we have Wait.on() in python.

Imported from Jira BEAM-12878. Original Jira may contain additional context.
Reported by: baeminbo.

@SanjayPanda
Copy link

Hi @damccorm,

I came across from apache_beam.transforms.util import WaitOn in the Python SDK. Is this the same as what you were suggesting?

I'm working on a side input scenario where I need the side input to be ready before the main pipeline starts. Could you clarify if WaitOn is the right approach for this?

@damccorm
Copy link
Contributor Author

damccorm commented Feb 7, 2025

Yes, it is the same, we should be able to close this issue.

I'm working on a side input scenario where I need the side input to be ready before the main pipeline starts. Could you clarify if WaitOn is the right approach for this?

If you're passing a side input in to the main PCollection, it should automatically get computed before that transform starts, so you shouldn't need anything special. WaitOn actually works by creating a side input relationship just like this.

@damccorm damccorm closed this as completed Feb 7, 2025
@github-actions github-actions bot added this to the 2.64.0 Release milestone Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants