Right now I’ve got a SQL query that sometimes returns no results. When it doesn’t, I want the graph to end. What’s the best way to address that? Preferably a non-coded solution.
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.
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]
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).