Can an IOManager access metadata that is added to ...
# ask-community
d
Can an IOManager access metadata that is added to the output in the Op? When I try the below, I get an error saying that there is no key with "num_rows". In the op:
Copy code
return Output(result, metadata={"num_rows": num_rows})
in the IOManager:
Copy code
def handle_output(context, obj):
  num_rows = context.metadata["num_rows"]
  ....
c
d
As an alternative to this, could I add a second Output to the op and it would be handled by the same IO Manager? or is that not possible?
I suppose I could just make it a Tuple and access the metadata as a dictionary passed in that way
c
The former works