Updated on 2025-04-21 GMT+08:00

SHOW_FS_PATH_DETAIL

Function

Checks statistics about a specified FS path.

Syntax

call show_fs_path_detail(path=>'[path]', is_sub=>'[is_sub]', sort=>'[sort]');

Parameter Description

Table 1 Parameter descriptions

Parameter

Description

Mandatory

path

Path of the FS to be queried

Yes

is_sub

The default value is false, indicating that statistics about a specified directory is collected. The value true indicates that statistics about subdirectories in a specified directory is collected.

No

sort

The default value is true, indicating that the results are sorted based on storage_size. The value false indicates that the results are sorted based on the number of files.

No

Example

call show_fs_path_detail(path=>'obs://bucket/path/hudi_mor/dt=2021-08-28', is_sub=>false, sort=>true);

Returned Result

Parameter

Description

path_num

Number of subdirectories in a specified directory

file_num

Number of files in a specified directory

storage_size

Size of the directory, in bytes

storage_size(unit)

Size of the directory, in KB

storage_path

Complete FS absolute path of the specified directory

space_consumed

Actual space occupied by the returned files/directories in the cluster, that is, the replication factor set for the cluster is considered.

quota

Name quota, which is a mandatory restriction on the number of files and directory names in the current directory tree

space_quota

Space quota, which is a mandatory restriction on the number of bytes used by files in the current directory tree

Caveats

  • This command is not supported when the metadata service provided by DLI is used.

Permission Requirements

Metadata service provided by DLI

  • SQL permissions: not supported.

Metadata services provided by LakeFormation. Refer to the LakeFormation documentation for details on permission configuration.

System Response

You can check if the job status is successful, view the job result, and review the job logs to confirm if there are any exceptions.