Confused about resource defs for assets inside job...
# ask-community
a
Confused about resource defs for assets inside jobs. I have an asset with
io_manager_key="file_gcs_io_manager"
. This is defined in my
Definitions
under the resources section. I am generating that asset inside of a job using the @job decorator. However, at runtime it throws an error:
Copy code
dagster._core.errors.DagsterInvalidDefinitionError: io manager with key 'file_gcs_io_manager' required by
output 'result' of op '<function_name>'' was not provided. Please provide a <class
'dagster._core.storage.io_manager.IOManagerDefinition'> to key 'file_gcs_io_manager', or change the
required key to one of the following keys which points to an <class
'dagster._core.storage.io_manager.IOManagerDefinition'>: ['io_manager']
Do I have to pass it in as a resource_def to my job decorator as well? Seems odd that it's not finding it in the global resource defs.
j
Hey @Alec Koumjian could you share a code snippet of what you have right now? feel free to dm it to me if needed
a
thanks, I'll send over a dm!
s
Were you able to get this resolved? Wondering if it's a bug with a recent release given this recent issue as well: https://dagster.slack.com/archives/C01U954MEER/p1674524054041209?thread_ts=1674523987.554649&amp;cid=C01U954MEER
a
I was able to make this working using the
define_asset_job
constructor.
s
Thanks! I actually wound up figuring this out. Was pointing my
dagit
instance to the wrong
Definitions
a
Just realized that is my colleague 😄