Last active
March 29, 2023 14:08
-
-
Save johannkm/b5eb2a22db281cd1e65d6b513ce09803 to your computer and use it in GitHub Desktop.
Dagster job factory for default tags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dagster import job | |
def custom_job(*args, **kwargs): | |
default_tags = {"foo": "bar"} | |
kwargs["tags"] = {**kwargs.get("tags", {}), **default_tags} | |
def inner(func): | |
return (job(*args, **kwargs))(func) | |
return inner | |
@custom_job() | |
def my_job(): | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment