how can I access a materialized asset in a job?
# ask-community
y
how can I access a materialized asset in a job?
f
“Access” it in what way? As in, find out where it was materialized?
If that is what you mean then it will have been materialized based on the I/O Manager assigned at the time.
If you are running locally and you are running with the default I/O Manager then it will have been materialized as a Pickle file on your local machine in your project folders under ‘storage’. See https://docs.dagster.io/concepts/ops-jobs-graphs/ops#outputs
y
@Fraser Marlow I mean using the output without re-materializing it. do I need to access the file using I/O manager or is there a way to access it as a parameter similar to how it can be accessed in a downstream asset? Thanks for your help.
s
Hi @Yehuda Ornstein - there's not currently an elegant way of doing this in Dagster, but we've been tracking similar requests here: https://github.com/dagster-io/dagster/issues/10874 If you'd be open to sharing what kind of action your job performs, we're trying to understand these use cases a little better
👍 1
y
@sandy thanks for the reply. I saw this issue and upvoted it. our use case is very straights forward; we have an asset that gets access tokens for different hosts. There tokens will be used by various jobs. The token asset only needs to be materialized every 12 hours and the jobs run every 5 minutes. if the jobs can use the assets seamlessly it would be great. otherwise the jobs need to get tokens every time they run (or we'll come up with some caching mechanism; not an elegant dagster solution)
s
I just merged a change that should help out with this: https://github.com/dagster-io/dagster/pull/12091 It will be included in next week's release
❤️ 2
y
@sandy wow; Thanks!!