ALTER VOLUME

Modifies Volume properties or refreshes the file directory metadata of a Volume.

Syntax

ALTER VOLUME [schema_name.]<volume_name> REFRESH;

Parameters

ParameterDescription
schema_nameName of the owning schema; current schema is used if omitted
volume_nameName of the Volume to modify
REFRESHRe-scan the external storage path and update the Volume's file directory metadata

Examples

  1. Manually refresh External Volume file metadata:
ALTER VOLUME my_oss_vol REFRESH;
  1. Specify the schema to refresh a Volume:
ALTER VOLUME my_schema.my_oss_vol REFRESH;

Notes

  • REFRESH only applies to External Volumes (mounting external storage); Named Volumes (internal storage) do not require refreshing
  • When files in the external object storage are added, deleted, or modified, REFRESH must be executed so that Lakehouse can detect the latest file list
  • If DIRECTORY.auto_refresh = true, the system will refresh automatically and no manual execution is needed

Required Privileges

PrivilegeDescription
ALTER VOLUMEModify Volume properties (e.g., execute REFRESH)