https://dagster.io/ logo
#ask-ai
Title
# ask-ai
a

Andy Smith

02/07/2024, 10:23 AM
can I submit a run request from an op
s

Scout

02/07/2024, 10:23 AM
Based on the documentation, there isn't a direct example or explicit mention of submitting a run request from within an op. However, the documentation does discuss the concept of run requests in the context of sensors, which are used to programmatically generate runs based on certain conditions or schedules. If you're looking to trigger a new run from within a job, you might consider using a sensor or some other external mechanism to submit a run request based on the output or state of an op. For example, you could have an op that writes to an external system or database, and a sensor that monitors that system and submits run requests when it detects certain conditions. For more advanced use cases, you might explore the Dagster GraphQL API, which allows for programmatic interaction with Dagster, including submitting run requests. The documentation mentions using the Python GraphQL client to submit runs, which could potentially be invoked within an op if you manage the necessary context and permissions. However, it's important to note that triggering runs from within ops is not a common pattern and might not be recommended because it could lead to complex dependencies and difficulties in managing the lifecycle of runs. It's generally better to keep ops focused on their specific computation or data processing task and use sensors, schedules, or external orchestration to manage run requests. If you have a specific use case in mind, I would recommend discussing it with the community or reviewing the documentation and examples related to sensors, schedules, and the GraphQL API for more guidance on how to achieve your goals.
7 Views