Steve Suway
05/23/2024, 8:07 PMChris White
persist_result=False
within the task decorator (e..g, @task(persist_result=False)
), Prefect will not attempt to store the return value anywhere, making it safe to return sensitive information. That being said, you aren't strictly required to encapsulate all logic within a task, so if you'd prefer you can also downgrade that call to a raw function (and maybe add a flow run level log or two to replace the task logs you would have gotten otherwise)Steve Suway
05/23/2024, 8:10 PMpersist_result=True
instead of =False
, that would be unsafe? Also - if we don't encapsulate in a task, there's no data persisted?Chris White
persist_result=True
Prefect will store the results of the task in the configured result store (which could be local, but still risky for sensitive data). If you don't encapsulate it, then Prefect won't persist itSteve Suway
05/23/2024, 8:31 PMChris White