https://dagster.io/ logo
#ask-community
Title
# ask-community
e

Edson Henrique

03/15/2023, 7:42 PM
how to add custom markers like "api"?
dagster bot responded by community 1
🤖 1
z

Zach

03/15/2023, 7:44 PM
you can add a "kind" tag to the op definition, like this:
Copy code
@op(
    tags={"kind": "api"},
)
def do_processing():
   ...
2
❤️ 1
t

Tim Castillo

03/15/2023, 7:50 PM
Zach is right for ops! and for assets, you can use the
compute_kind
argument on the asset decorator, like here
Copy code
@asset(
    compute_kind="api",
    required_resource_keys={"data_api"}
)
def users(context) -> pd.DataFrame:
    """A table containing all users data"""
    api = context.resources.data_api
    resp = api.get_users()
    users = pd.read_json(resp.json())
    return users
❤️ 1
e

Edson Henrique

03/15/2023, 7:52 PM
thanks guys!