Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all the mount points in Azure Databricks?

I tried with this %fs ls dbfs:/mnt, but i want to know do this give me all the mount point?

like image 764
Shahid Ahmed Avatar asked Jun 05 '20 12:06

Shahid Ahmed


People also ask

How do I check my mount points?

The command findmnt lists all mount points. To do this the findmnt reads files /etc/fstab, /etc/fstab. d, /etc/mtab or /proc/self/mountinfo.

What is mount point in Azure Databricks?

The mount is a pointer to an S3 location, so the data is never synced locally. After a mount point is created through a cluster, users of that cluster can immediately access the mount point. To use the mount point in another running cluster, you must run dbutils. fs.

Where is Dbfs mounted?

The Databricks File System (DBFS) is a distributed file system mounted into an Azure Databricks workspace and available on Azure Databricks clusters.

What is mount name in Databricks?

myfile(<mount-name>) is a DBFS path and represents what container/folder will be mounted in DBFS as specified in “source”. You can type in your <mount-name> config is the <conf-key> which is this “fs. azure.


2 Answers

You can simply use the Databricks filesystem commands to navigate through the mount points available in your cluster.

%fs
mounts

This will give you all the mount points and also display the corresponding ADLS source file path.

like image 100
Mission Coding Avatar answered Oct 05 '22 09:10

Mission Coding


I like to do the following :

display(dbutils.fs.mounts())

as it displays the databricks path and external endpoint.

enter image description here

I find it safer than %sh ls /mnt/ as you can have a folder in /mnt/ that is not pointing to an external storage.

like image 24
Axel R. Avatar answered Oct 05 '22 09:10

Axel R.