Using dbutils.fs.ls gives overlap error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 10:45 AM
I created a schema with that route as a managed location.
(abfss://~~@~~.dfs.core.windows.net/dejeong)
And an external table named 'first_table' was created in the corresponding path.
(abfss://~~@~~.dfs.core.windows.net/dejeong/first_table)
The results of the dbutils.fs.ls and sql list clauses are different for the three paths.
%python
dbutils.fs.ls("abfss://~~@~~.dfs.core.windows.net/dejeong") --> managed location overlaps error
dbutils.fs.ls("abfss://~~@~~.dfs.core.windows.net/dejeong/__unitystorage") --> managed location overlaps error
dbutils.fs.ls("abfss://~~@~~.dfs.core.windows.net/dejeong/first_table") --> out[3]
%sql
list"abfss://~~@~~.dfs.core.windows.net/dejeong" --> out[2]
list "abfss://~~@~~.dfs.core.windows.net/dejeong/__unitystorage" --> managed location overlaps error
list "abfss://~~@~~.dfs.core.windows.net/dejeong/first_table" -->out[2]
Is this a bug in dbutils.fs.ls?
Or did I do something wrong?
I want to navigate parent path with dbutils.fs.ls syntax.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2023 06:08 PM
@jin park :
It seems like there is an overlap in the path when you use dbutils.fs.ls() to list the contents of
abfss://~~@~~.dfs.core.windows.net/dejeong, which is the managed location. This may be due to the fact that the managed location is also a path, and this is causing a conflict. To navigate to the parent path, you can use dbutils.fs.ls("abfss://~~@~~.dfs.core.windows.net/dejeong/"), with a trailing slash at the end of the path. This should list the contents of the parent directory without causing any conflicts.
Alternatively, you can try using dbutils.fs.ls("abfss://~~@~~.dfs.core.windows.net/dejeong/__internal")
, which is the internal directory where managed tables are stored, instead of __unitystorage.
It's also worth noting that the behavior of dbutils.fs.ls() and list in SQL may differ, as they are different methods and may handle paths differently.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2023 11:50 PM
dbutils.fs.ls("abfss://~~@~~.dfs.core.windows.net/dejeong/ ")
This route still gives me an error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2023 10:22 PM
Hi @jin park
Hope everything is going great.
Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you.
Cheers!

