The ALTER DATALAKE SQL can be used to change the Authorization objects or add, modify or drop using clauses that were specified when creating the DATALAKE object. The ALTER DATALAKE SQL cannot be used to change the TABLE FORMAT for the data lake. The only supported TABLE FORMAT is ICEBERG or DELTALAKE.
Altering the Authorization Object Information
To alter the Catalog and Storage Authorization for the DATALAKE object, the new or updated object can be specified in the EXTERNAL SECURITY clause. The following example alters the Authorization object associated with the DATALAKE:
ALTER DATALAKE datalake_test EXTERNAL SECURITY INVOKER TRUSTED CATALOG catalog_invoker_new, EXTERNAL SECURITY INVOKER TRUSTED STORAGE storage_invoker_new;
Altering the Name-Value Pairs in the USING Clause
The Name-Value pairs that define catalog and storage connection information can be added, modified or dropped using the ALTER DATALAKE…ADD/DROP option.
The following example modifies the catalog_location and storage_location clauses.
ALTER DATALAKE datalake_test ADD catalog_location ('s3://<folder>/') storage_location ('s3://<folder>/');
The following examples modifies the storage_region for the DATALAKE:
ALTER DATALAKE datalake_test ADD storage_region ('us-west-2');