Customer Portal

What's the best wait to halt a graph if a certain component returns no rows/results?

Comments 3

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hello Kyle,

    As you already discussed with my colleague via email, you can modify your SQL query and add a fake record in case the original query returns 0 records. See Getting SELECT to return a constant value even if zero rows match

    This fake record can contain an identifier and ExtFilter can redirect it wherever you want. Or, if you have only one stream of data, DBInputTable returning 0 records means that all components after DBInputTable will end automatically and successfully.
  • Avatar
    kylemoseley
    0
    Comment actions Permalink
    Or, if you have only one stream of data, DBInputTable returning 0 records means that all components after DBInputTable will end automatically and successfully.


    This is more my situation. I have two queries that are running in parallel. Query A and Query B both fire (seperate connectors/edges). But if Query B fires and returns nothing, I would like Query A to not even attempt to fire.


    [query A]----[transformations & store a certain val to dictionary]-----[trash]

    [query b]-------[transform]---[inject dictionary value]------[insert statement]
  • Avatar
    imriskal
    0
    Comment actions Permalink
    If this is the case, I recommend splitting the two streams into separate graphs. Then you can orchestrate them using a jobflow and send values between them using either parameters or temp files (depending on size of the data transferred).

Please sign in to leave a comment.