Hi all, hope you can help me clarify something - s...
# ask-community
m
Hi all, hope you can help me clarify something - specificaly the relationship between assets and ops. I have a my soffware defined assets, all good there, but I'm also abusing the @asset decorator to define some "non assets" - for example:
Copy code
@asset
def latest_data()->pd.DataFrame:
    ...
    return df

@asset
def send_email_if_latest_data_is_empty(latest_data)->None:
    if latest_data.is_empty:
        send_warning_email()
Is there a better way to handle this? In particular I really like seeing these dependencies in the Dagit UI
s
If this works for you, I'd say go with it. The alternative would be to have an op-based job on a sensor that runs after the asset completes, but you wouldn't see it in the asset graph anymore then.
m
I'm happy with the non-asset assets functionaly, just wanted to make sure I was not missing some Dagster functionality.