hmmmm :thinking_face: when to use @ops and when to...
# ask-community
hmmmm 🤔 when to use @ops and when to use @assets ? Been off dagster for a bit now and have just got back into using it. And i noticed the @asset feature. It seems unclear to me when to use an Asset and when to use an op. Watched quite a few vid from the elementl team and they seem to be using mostly @assets. Even if say you are just filter a dataframe. I would have though the fiiltering like that would have been done as an op? Is there any actual data processing features that are different between an op and asset. Or is it just how they are represented in dagit ?
Hi Tim! the main difference between assets and ops is that asset has the resulting dataframe (in this case) as well as the transformation logic that created it. To generalize, we recommend using assets for those types of transformation tasks and ops when there is no output. Take a look at this guide:
This might also be useful (targeted at new users, while what Odette listed is more targeted at existing users who are used to ops):
Thank you. Both these answers offer good direction.