"dbfs:" quote added as a prefix to file path

dbsuersu
New Contributor II

There is a mount path /mnt/folder

I am passing filename as a variable from another function and completing the path variable as follows:

filename=file.txt

path=/mnt/folder/subfolder/+filename

When I'm trying to use the path variable is a function, for example:

function1(path)

The following error is encountered:

"Path does not exist: dbfs:/mnt/folder/subfolder/file.txt"

Not sure why "dbfs:" is being prefixed in the path

-werners-
Esteemed Contributor III

databricks uses the databricks file system (dbfs) by default.

So my guess is you did not mount the path in databricks.