https://dagster.io/ logo
Title
c

Chris Roth

03/22/2023, 3:08 PM
If I use a python console to materialize an asset with:
result = materialize(
    [my_assets], 
    run_config=default_config, 
)
I'd now like to use the generated asset in my console. How to I access the asset? Part 2: If I want to work with an asset on my deployed dagit server, can I load it up on my local python console for debugging purposes?
j

jamie

03/22/2023, 3:32 PM
you can get the value returned by the asset doing
result.output_for_node("my_assets")
for 2 it’s a bit more complicated. How are you deploying dagster?
c

Chris Roth

03/22/2023, 3:38 PM
Thanks @jamie
for 2 it’s a bit more complicated. How are you deploying dagster?
on k8s
j

jamie

03/22/2023, 3:38 PM
ok. and where are the outputs of your assets being stored?
c

Chris Roth

03/22/2023, 3:38 PM
s3, which I can access from my dev machine.
j

jamie

03/22/2023, 3:40 PM
ok! you might be able to do this https://docs.dagster.io/concepts/assets/software-defined-assets#loading-asset-values-outside-of-dagster-runs basically you would import your Definitions object into your python console and run the
load_asset_value
command. That should hook into the IO manager used to store the asset and load it for you
c

Chris Roth

03/22/2023, 3:42 PM
I'll give it a shot. Thanks again. The
output_for_node
command works great. Just what I was looking for.