I am trying to open index.html file through databricks. Can someone please let me know how to deal with it? I am trying to use GX with databricks and currently, data bricks store this file here: dbfs:/great_expectations/uncommitted/data_docs/local_site/index.html
I want to send index.html
file to stakeholder
Asked
Active
Viewed 1,220 times
1

Alex Ott
- 80,552
- 8
- 87
- 132

SeleniumUser
- 4,065
- 2
- 7
- 30
1 Answers
1
I suspect that you need to copy the whole folder as there should be images, etc. Simplest way to do that is to use Databricks CLI fs cp
command to access DBFS and copy files to the local storage. Like this:
databricks fs cp -r 'dbfs:/.....' local_name
To open file directly in the notebook you can use something like this (note that dbfs:/
should be replaced with /dbfs/
):
with open("/dbfs/...", "r") as f:
data = "".join([l for l in f])
displayHTML(data)
but this will break links to images. Alternatively you can follow this approach to display Data docs inside the notebook.

John Rotenstein
- 241,921
- 22
- 380
- 470

Alex Ott
- 80,552
- 8
- 87
- 132
-
Thanks for your reply. I am able to open it on my windows machine through databricks CLI but I want to share that file with stakeholders so is there any way to directly open that file in the data brick itself or in the browser from databricks – SeleniumUser Sep 02 '22 at 14:55
-
updated the answer – Alex Ott Sep 02 '22 at 15:21
-
Yeah it works with broken links – SeleniumUser Sep 02 '22 at 16:25