Hello everyone! I'm currently playing around with ...
# ask-community
t
Hello everyone! I'm currently playing around with the artifacts. I'm wondering if i can give artifacts a custom name. does anybody know if it's possible and how to do it?
e
I think it is hardwired to the task name. I dug down the source code a little, and I think an artifact is just a mapping between task_run_id and artifact data. So I guess, changing then task name changes the artifact name šŸ˜…
t
i did that too already (also tried to set the task_run_id via the context just before creating the markdown but always ran into many exceptions) thanks for checking! something for a feature requests then...
z
Changing the task run id will break things because that id is linked to the database šŸ˜„ changing the task run name is allowed though. Perhaps take a look at https://docs.prefect.io/core/concepts/templating.html
If you take a look at https://github.com/PrefectHQ/server/blob/615b440d49f2b9ab27a960a9b20337aa05c7cc57/src/prefect_server/database/models.py#L366 there is no concept of a name for an artifact in the backend
(as emre had determined)
t
thanks for replying! i was trying to do that but didnt quite work out as i wanted it to be. i am using great_expectations with prefect and i am currently trying to get it running with a mapped task environment but running into problems because the mapped tasks can't find the config files for great_expectations. was about to post another message into the chat. do you want me to open another thread for that?
z
You may want to -- it's not my support day so you're more likely to get a response and it exposes it to the rest of the community.
āœ… 1