Hi, I am looking for some help with prefect_sqlalchemy for how I could customize the sqlalchemy_execute task? Like giving a custom name, number of retries if it is possible
n
Nate
11/22/2022, 5:03 PM
Hey @Tibs
you can use
with_options
to change the settings of your task or flow like
Copy code
In [11]: from prefect_sqlalchemy.database import sqlalchemy_execute
In [12]: sqlalchemy_execute.name, sqlalchemy_execute.retries
Out[12]: ('sqlalchemy_execute', 0)
In [13]: my_new_task = sqlalchemy_execute.with_options(name="My SQL Alchemy Execute", retries=2)
In [14]: my_new_task.name, my_new_task.retries
Out[14]: ('My SQL Alchemy Execute', 2)
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.