Hi experts, Something I try to understand : How t...
# ask-community
s
Hi experts, Something I try to understand : How to retrieve returned result of my custom io_manager here (load_input result) ? Regards,
🤖 1
c
Hi Sebastien. To clarify, the IO manager referenced by
io_manager_key
will be used when loading
dta_f0101
as an input or persisting it as an output. So
io_manager_oracle.load_input
will only be called by assets downstream of
dta_f0101
when trying to load
dta_f0101
. It seems like you want to instead load specific contents as an input to
dta_f0101
. You can do something like this:
Copy code
source = SourceAsset("source", io_manager_def=custom_io_manager)


@asset
def dta_f0101(context, source):
    <http://context.log.info|context.log.info>(source)
    ...
What this does is it defines a source asset upstream of
dta_f0101
, and assigns that source asset your custom IO manager. So when
dta_f0101
executes, it has to load the source asset by calling your custom IO manager's
load_input
method.
👍 1
s
Hi Claire, thank you very much for your reply
Something I don't understand. The materialization of the asset dta_f0101 calls to the handle_output method of the io_manager "*OracleIOManager*", which returns a pandas DataFrame. Can't I retrieve this result in line 37 ?
Ah sorry, i make confusion between handle_output and load_input As I can see, materialization is calling handle_output (to build and store) data result when I try to get a load_input result 🤦‍♂️