It's possible to preview materialized jupyter note...
# ask-community
It's possible to preview materialized jupyter notebooks inside dagit, which is great. Is this possible for other filetypes also, e.g. pdf files or html reports?
❤️ 1
you can add metadata to the asset output. MetadataValue can take a notebook path and render it in the asset metadata section (apidoc). or, you could also try make it show up as markdown (apidoc) example of how to add metadata to asset output: and it’d show up similar to this:
🙏 1
a workaround i did for this was to add a line in the IOManager I use, so that when the ipynb is written to file, then it is also written as an html with this extra line:
os.system(f'jupyter nbconvert --to html "{output_notebook_path}"')
Then I add the path to the notebook as metadata to the asset.
Copy code
metadata = {
    "Executed notebook": MetadataValue.notebook(output_notebook_path),
    "HTML output": MetadataValue.url(pathlib.Path(str(output_notebook_path).replace(".ipynb", ".html")).as_uri())
But, you can't click the url to the html -> think this is blocked somehow in dagster. so need to copy/paste the link. Still, pretty good
🙏 1
Great, thank you both