Is there a utility to convert between "/dbfs" and "dbfs:" path strings?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2023 09:19 AM
Is there a built-in utility function, e.g., dbutils, that can convert between path strings that start with "dbfs:" and "/dbfs"?
Some operations, e.g, copying from one location in DBFS to another using dbutils.fs.cp() expect the path starting with "/dbfs", whereas others, e.g., copying from DBFS to S3 using dbutils.fs.cp() expect DBFS path strings to start with "dbfs:".
A built-in utility function to convert between these paths strings will be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2023 11:02 AM
Hi @Fijoy Vadakkumpadan ,
You can use lstrip built-in function to remove this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 08:51 PM
Thanks, but not what I'm looking for. I was looking for a built-in function to go from "/dbfs/hello/test" to "dbfs:/hello/test"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2023 01:33 AM
Hi @Fijoy Vadakkumpadan
Thank you for posting your question in our community! We are happy to assist you.
To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?
This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance!

