How do I get files into /FileStore to be accessed with /files from within my notebooks?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 05:27 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 05:27 PM
For context, DBFS exposes a special location called
/FileStore
as follows:display(dbutils.fs.ls("/FileStore"))
This location can be accessed by HTML, JavaScript, and CSS at its equivalent
/files
as follows:<script src="/files/..."/>
In order to get assets into
dbfs:/FileStore
, you can first copy it locally from a url as follows:import sys.process._
"wget -P /tmp http://d3js.org/d3.v2.min.js"; !!
You can verify that this file was downloaded as follows:
display(dbutils.fs.ls("file:/tmp/d3.v2.min.js"))
Using
file:/
with DBFS accesses the local filesystem.Then use dbutils to copy the local file into the mount as follows:
dbutils.fs.mkdirs("/FileStore/customjs")
dbutils.fs.cp("file:/tmp/d3.v2.min.js", "/FileStore/customjs/d3.v2.min.js")
You can verify that the file was copied as follows:
display(dbutils.fs.ls("/FileStore/customjs"))
This newly-downloaded JavaScript file can now be accessed from HTML as follows:
<script src="/files/customjs/d3.vs.min.js"/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2016 05:30 PM
One follow on question. Is it possible to make a resource public.
I am generating a html file which I would like to be available to anyone. Is it possible to "publish" this html page like I have published a dashboard. I can access it when I log into my databricks account but I would like a public URL with no login required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2016 11:00 PM
Hello Pls help (Not an Answer),
How do I download complete csv (>1000) result file in FileStore unto my laptop?
I was trying to follow this instruction set SQL tutorial (Download All SQL - scala)

