LIST
Applies to: Databricks SQL Databricks Runtime 10.4 LTS and above Unity Catalog only
Lists the objects immediately contained at the URL.
Syntax
LIST url [ WITH ( CREDENTIAL credential_name ) ] [ LIMIT limit ]
Parameters
url
A
STRING
literal with the location of the cloud storage described as an absolute URL.-
An optional named credential used to access this URL. If you supply a credential it must be sufficient to access the URL. If you do not supply a credential the URL must be contained in an external location to to which you have access.
limit
An optional
INTEGER
constant between 1 and 1001 used to limit the number of objects returned. The default limit is1001
.
Examples
> LIST 'abfss://container@storageaccount.dfs.core.windows.net/some_dir' WITH (CREDENTIAL azure_some_dir) LIMIT 2
path name size modification_time
--------------------------------------------------------------------- ------ ---- -----------------
abfss://container@storageaccount.dfs.core.windows.net/some_dir/table1 table1 0 ...
abfss://container@storageaccount.dfs.core.windows.net/some_dir/table1 table1 0 ...
Related articles
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for