Hey all, I understand that task parameters are now...
# prefect-ui
r
Hey all, I understand that task parameters are now only shown as types in the prefect UI, without actual concrete values. How can I configure it such, that actual values are shown, like for flow runs? Or is this just a problem of prefect 2 and will change with prefect 3?
2
n
hi @Robin - task run parameters are not stored anywhere in the API by design so you'd need to selectively expose things as desired with logs or artifacts
r
OK, I assume that is related to the hybrid model?
Designed such that only task meta data is exposed by default?
n
somewhat! its mostly security (often lots of PII in task run parameters) and the fact that we don't want to require that task run parameters be JSON serializable, like for example a sqlite client
r
OK, that makes a lot of sense, thanks!
👍 1
I have one situation, where it would be neat to have that information, but on the other hand it could as well be exposed via artifacts 🤔
Can I create task name descriptions based on parameters? that would probably solve that issue, such that the UI becomes more informative / faster to navigate
n
like this?
Copy code
In [1]: from prefect import task

In [2]: @task(task_run_name="fetch from {table}")
   ...: def select_from_table(table: str):
   ...:     pass

In [3]: select_from_table("USERS")
14:00:08.354 | INFO    | Task run 'fetch from USERS' - Finished in state Completed()
💯 1
upvote 1
🙌 1
r
Thanks!