https://prefect.io logo
m

Michael Michael

07/11/2023, 10:47 AM
Hi community, I have the following simple flow. This consists of only one load task.
@flow
def flow():
db_connection = db_connection()
with db_connection() as cursor:
load(cursor)
However, when I run it I get the error: Flow run encountered an exception. ProgrammingError: no results to fetch I have already found out that it is probably the cursor object which I pass to the task. Is there a way to make a database connection and then pass it to the tasks? thanks :)
c

Christopher Boyd

07/11/2023, 1:41 PM
You can’t pickle / pass db connections