cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying images hosted in a Unity Catalog volume in a notebook

maasg
New Contributor II

I have an image dataset in a Volume in the Unity Catalog.
As part of exploratory analysis, I want to run some queries and display the resulting image set.

Yet, including dynamic references to images in the Catalog doesn't seem to work on a Databricks Notebook.
This works (and the HTML version as well)
![](/Volumes/catalog/schema/path/img.png)


Yet, if the reference path to the image is dynamic, it doesn't work. For example:
image_path="/Volumes/catalog/schema/path/img.png"
txt_html = f"""img is at:{image_path}"""
displayHTML(txt_html) # Sanity check - OK!
img_html = f"""img src="{image_path}" width="400px"""" # Add the missing braces -- the forum editor doesn't like HTML
displayHTML(img_html) # Doesn't work


How can I dynamically display images from the catalog?

PS: Your post has been changed because invalid HTML was found in the message body. The invalid HTML has been removed. Please review the message and submit the message when you are satisfied.
-=> This deleted my complete post and I had to start over again X3 😞

2 REPLIES 2

Walter_C
Databricks Employee
Databricks Employee

Unity Catalog currently does not fully support displaying image metadata dynamically in notebooks and may trigger errors such as [UC_COMMAND_NOT_SUPPORTED.WITHOUT_RECOMMENDATION]

Suggested workaround:

  • Consider exporting the images from Unity Catalog to a directory accessible within the cluster (like DBFS) and use dynamic paths to reference images stored directly in DBFS instead. DBFS integration might bypass Unity Catalog limitations for unstructured data.

maasg
New Contributor II

Hi @Walter_C , 

Thanks for your suggestion. Exporting the images (=> duplicating the storage) is a no-go in our case. We are talking about very large automotive datasets.
Is there another option or should we consider moving this data out of the catalog? We also face limitations from  the Delta sharing client perspective to access this data from the ML pipeline.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now