I’m getting the following error when I try to iter...
# ask-community
I’m getting the following error when I try to iterate through a dataframe result in a graph: “DagsterInvariantViolationError: Attempted to iterate over an InvokedSolidOutputHandle”. I’m not sure if this a valid pattern, but what I basically have is a graph the executes several ops. The first op returns a dataframe which I am trying to iterate the result in a for loop calling other ops until all rows are processed. So it looks like: result = op1(). For row in result: op2(row), etc. Please let me know if this a valid pattern and if not, please let me know how to process data in this pattern in dagster
you might want to take a look at DynamicOutputs, this fan-out pattern you're trying to do is exactly what it's for. that being said, you might find that running an op for every row in a dataframe might end up being very inefficient, depending on the number of rows. the overhead for launching an op is pretty large, so you're usually better off applying functions to dataframes using something like a