Hi team, I have a pipeline A that does some pre-co...
# ask-community
h
Hi team, I have a pipeline A that does some pre-computation and then waits for an asset from pipeline B before proceeding. Is there a way that I could create a solid in pipeline A to listen to asset materialization events from other pipelines please?
One approach might be to combine A and B into a single pipeline. However, this will ends in a large pipeline which doesn’t correlate to business logic and also create problems for sensors. Another approach would be to break down pipeline A but again..it’s breaking down a group of things that logically belongs to the same pipeline.
m
Hi Hebo, have you looked at the GraphQL API at all?
h
Not yet. Should I use graphql api to query for specific materialization event?
a
Is n't this a use-case for sensors? Can't the sensor for pipeline A listen for the assent events produced by the pipeline B before triggering the request?
m
yep @Arun Kumar -- that will certainly work if we want to trigger the whole pipeline (vs. having a single solid in the pipeline wait)
h
I already have a sensor for pipeline A so that it could start to do the pre-computation.
But need then to wait for some other dependency. This way, the job finishes up earlier.
a
I see. May be I am missing something fundamental about your use case. Why would you not want to break it into different pipelines? Apparently it feels like it should be a different pipeline as it has a different dependency. Also, since we are running a pipeline in a separate k8s pod, if the assets from Pipeline B took a long time to appear, pipeline A will be holding the pod unnecessarily.
m
it might make sense to have three pipelines instead -- so that pipeline A does pre-computation, pipeline B does its work, and pipeline C waits on both of them
👍 1
otherwise yeah, you will essentially end up reproducing sensor logic in the solid that waits
h
Thanks Max and Arun! Yeah, I ended in creating 3 pipelines and 3 sensors.