https://prefect.io logo
h

Heeje Cho

01/26/2022, 6:04 PM
Is there a prefect recommended way of checking length of tuples received from database fetches (PostgresFetch, SqlServerFetch)? I don't think you can do get length on a task. This is just to set a case statement depending on length of tuple.
a

Anna Geller

01/26/2022, 6:14 PM
The best way to solve it would be to build your own task that would connect to your database and retrieve the data in the way that you need it. Alternatively, you can build a separate task that consumes the output of this fetch task and returns the length i.e.
len
of its output
h

Heeje Cho

01/26/2022, 6:24 PM
Got it, the latter is what I'm doing now. Thanks.
👍 1
4 Views