https://prefect.io logo
Title
d

Dylan Lim

01/17/2023, 10:10 AM
Hi there, I am using
prefect-sqlalchemy
and have set up a
SqlAlchemyConnector
block. However, I notice that there is an ‘Optional’ fetch size that defaults to 1 and impacts my queries eg.
fetch_many
. Is there a way to prevent this fetch size from being enforced, especially if I don’t know how many rows I am retrieving beforehand?
a

Andrew Huang

01/17/2023, 4:48 PM
Maybe you can try using fetch_all?
Or you can use a while loop to keep fetching the rows in batches like in the examples.
d

Dylan Lim

01/18/2023, 2:39 PM
Thanks! Not sure how I missed
fetch_all
.