Help Needed: for try loop

I am trying create a component, which can try to connect to Databricks and only output the DB connection when I successfully connect to it. But I got the error message that ”Output node must not be part of a loop construct.“ How can I solve my problem?


If I put the Component Output outside the loop, then another error message “ERROR Variable Condition Loop End 7:0:2297 Loop Body wired incorrectly (Branches are not permitted to leave loops!).
WARN Component Output 7:0:2 Output node must not be part of a loop construct.
Node is part of loop body (started by Counting Loop Start #47).”

Hi,
I think you have to put your component within the Try-Catch-Loop.

It seems you have tried to adapt this Workflow to your problem:

There you can see, that the download of the data is within the “Try-Catch-Loop” as well.

I created a slight adaptation to collect the data at the end of the loop. Maybe this helps as well:

1 Like

In my case, I need to output a DB connection as a component, I don’t want to directly query data from Databricks.

Ah I see. You want to iterate as long the connection is not working and then pass the database connection to nodes/constructs downstream.

Unfortunately branches are not allowed in loops so, it’s not possible to wire the DB session to the component output (you already showed this).
Also the “loop end” nodes do not have a DB connection ports or similar, so it’s not possible to pass the connection over these nodes too.

Hmm, I don’t have an idea how to fix this…