Hi everyone, I'm trying to persist the results of ...
# prefect-getting-started
j
Hi everyone, I'm trying to persist the results of my tasks. Referred to the docs and I found that we can rename the persisted file using the result storage key. However, when I tried to use it in my task decorator, the error is
TypeError: task() got an unexpected keyword argument 'result_storage_key'
. I'm using Prefect version 2.8.2.
n
hi @juana this error appears to be because you're passing the
result_storage_key
to the task's function instead of the task decorator itself. you should be able to pass it like
Copy code
@task(result_storage_key="foo.json")
def foo():
   pass