Is there a way for me to update the tags of a JobD...
# ask-ai
s
Is there a way for me to update the tags of a JobDefinition after it has been defined?
s
According to the documentation, tags can be specified when defining a job using the
@job
decorator or the
GraphDefinition.to_job
method. These tags are specified as a dictionary of key-value pairs where the key must be a string and the value must be a string or JSON that is serializable to a string. Here's an example of how to specify tags at job definition:
Copy code
python @job(tags={"foo": "bar"}) def my_job_with_tags():     my_op()
However, the documentation does not provide a direct method for updating the tags of a
JobDefinition
after it has been defined. Tags are generally considered to be immutable once attached to the job. If you need to change the tags, you would typically redefine the job with the new tags. If you are looking for a way to dynamically add or modify tags at runtime, this is not explicitly covered in the documentation provided. You may want to explore the Dagster API or other parts of the documentation for any newer features or patterns that might support this use case.