File tree Expand file tree Collapse file tree 1 file changed +23
-2
lines changed
experimental/python/databricks/bundles/core Expand file tree Collapse file tree 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change 1414@dataclass (frozen = True )
1515class ResourceMutator (Generic [_T ]):
1616 """
17- Mutators defined within a single Python module are applied in the order they are defined.
18- The relative order of mutators defined in different modules is not guaranteed.
17+ Resource mutators are used to modify resources before they are deployed.
18+
19+ Mutators are applied both to resources defined in YAML and Python.
20+ Mutators are applied in the order they are defined in databricks.yml.
21+
22+ Example:
23+
24+ .. code-block:: yaml
25+
26+ experimental:
27+ python:
28+ mutators:
29+ - "resources:my_job_mutator"
30+
31+ .. code-block:: python
32+
33+ from databricks.bundles.core import Bundle, job_mutator
34+ from databricks.bundles.jobs import Job
35+
36+
37+ @job_mutator
38+ def my_job_mutator(bundle: Bundle, job: Job) -> Job:
39+ return replace(job, name="my_job")
1940
2041 See :meth:`databricks.bundles.core.job_mutator`.
2142 """
You can’t perform that action at this time.
0 commit comments