https://dagster.io/ logo
#ask-community
Title
# ask-community
c

Chris Nogradi

02/07/2023, 3:38 PM
Is there a work around to getting the results from a dagstermill asset running in the pipeline? I am running into this:
Copy code
def yield_result(self, value, output_name="result"):
 
    <snip>
 
    # dagstermill assets do not support yielding additional results within the notebook:
    if len(step_context.job_def.asset_layer.asset_keys) > 0:
      raise DagstermillError(
        "dagstermill assets do not currently support dagstermill.yield_result"
      )
🤖 1
j

jamie

02/08/2023, 2:28 PM
this is maybe a bit hacky but you could manually write your result to storage, then you could make no-op asset with the name set so that it corresponds with the location where you store the result in the notebook. This asset would take the notebook asset as a
non_argument_deps
. then i think you could use the asset corresponding to the result in other assets and it would fetch the correct value from storage. big caveat - i’ve never tried this and i dont know if you’ll run into typing issues (returning None from the asset but expecting it to be a typed value in a downstream asset may be an issue) or other major issues. If you want to give it a try i recommend writing up a super simple notebook + asset graph to test it out
c

Chris Nogradi

02/08/2023, 4:01 PM
Thanks @jamie I was thinking the same thing. Thanks for confirming that solution.
2 Views