Gene Yang
08/25/2023, 2:57 PM10:28:42.647 | INFO | Flow run 'glorious-woodpecker' - Created task run 'extract_maxmind_databases-0' for task 'extract_maxmind_databases'
10:28:42.648 | INFO | Flow run 'glorious-woodpecker' - Executing 'extract_maxmind_databases-0' immediately...
10:28:45.525 | INFO | Task run 'extract_maxmind_databases-0' - Finished in state Completed()
10:44:11.395 | INFO | Flow run 'glorious-woodpecker' - Created task run 'transform_firsttime_data-0' for task 'transform_firsttime_data'
10:44:11.396 | INFO | Flow run 'glorious-woodpecker' - Executing 'transform_firsttime_data-0' immediately...
Jake Kaplan
08/25/2023, 4:03 PMquote()
says to ignore it
from prefect.utilities.annotations import quote
@task
def do_pandas_stuff(df):
...
@flow
def my_flow():
df = get_my_df()
do_pandas_stuff(quote(df))
Joni Pelham
08/25/2023, 4:18 PMJake Kaplan
08/25/2023, 4:32 PMquote()
basically tells prefect to not look at the parameter. That can give performance gains when the parameter is really big, so prefect doesn't take time to look.
It's not free though. you'll lose task result linking for example if prefect can't inspect the parameter (that the result of 1 task was passed to another task, see screenshots)
in the dataframe case you're not giving up later performance or anything