I have a custom IOManager, that has a method ```de...
# ask-community
I have a custom IOManager, that has a method
Copy code
def handle_output(self, context, obj: Any):
this is used from the asset definition
Copy code
I want to send a parameter to the
, so that it will either delete&load or will do an append. how can send this param? if its through
how to set it in the asset definition? or is it any other way?
Hey, maybe like this? https://docs.dagster.io/concepts/resources#configuring-resources-at-launch-time Just a guess, haven't done it one my own. The example looks similar to what you would need. Instead of table you would have your parameter for deciding how to store the data.
hi @remis haroon! there are three possible times at which you might want to send that information, so the correct answer here will differ based on what your precise use case is. In my mind: 1. this is a per-asset distinction, and once the asset is defined you will never want to change this value. In this setup, you can set the metadata on an AssetOut, then read that metadata from context.metadata. 2. this is a pre-runtime distinction, so before you execute your asset you'll want to choose one of those two options. In this case, the above answer is what'd I'd recommend 3. this is a during-runtime distinction, so while you're executing the asset you'll make that determination. In this case, the simplest option might just be to return a tuple of (bool, regular output), where that bool determines the storage behavior