The REPLACE DATALAKE SQL can be used to add or replace the definition of a DATALAKE. The syntax and usage rules are the same as the CREATE DATALAKE SQL.
Syntax
REPLACE DATALAKE <datalake_name> <auth_list> USING catalog_type <left_paren> <catalog_type_literal> <right_paren> [catalog_location <left_paren> <catalog_location_literal> <right_paren>] [storage_location <left_paren> <storage_location_literal> <right_paren>] [storage_region <left_paren> <storage_region_literal> <right_paren>] [unity_catalog_name <left_paren> <unity_catalog_name_literal> <right_paren>] [storage_account_name <left_paren> <storage_account_name_literal> <right_paren>] [tenant_id <left_paren> <tenant_id_literal> <right_paren>] [default_cluster_id <left_paren> <default_cluster_id_literal> <right_paren>] [<custom_clause_list>] TABLE FORMAT <format_type>; <datalake_name>::= !! Teradata identifier <auth_list>::= EXTERNAL SECURITY <auth_type> [{<comma> <auth_list>}...] <auth_type>::= DEFINER TRUSTED <connection_type> <auth_name> | [INVOKER] TRUSTED <connection_type> <auth_name> <connection_type>::= CATALOG | STORAGE <auth_name>::= !! Teradata identifier <catalog_type_literal>::= <quote> <catalog_type> <quote> <catalog_location_literal>::= <quote> <catalog_uri> <quote> <storage_location_literal>::= <quote> <storage_uri> <quote> <storage_region_literal>::= <quote> <storage_region> <quote> <unity_catalog_name_literal>::= <quote> <unity_catalog_name> <quote> <storage_account_name_literal>::= <quote> <storage_account_name> <quote> <tenant_id_literal>::= <quote> <tenant_id> <quote> <catalog_type>::= hive | glue | unity <catalog_uri>::= !! Catalog URI, e.g. thrift://example.com, required when catalog_type is hive or unity <storage_uri>::= !! Storage URI, e.g. s3://example-iceberg-v1/, required when catalog_type is hive <storage_region>::= !! Cloud region, e.g. us-west-2, required when catalog_type is glue or hive <unity_catalog_name>::= !! Unity/Azure Databricks catalog name, e.g. reg_iceberg_db, required when catalog_type is unity <storage_account_name>::= !! Azure DataLake Storage Gen2 storage account name, e.g. regicebergstorageacct, required when catalog_type is unity <tenant_id>::= !! Azure Active Directory service principal tenant ID, e.g. 391c8c4c-6a2a-40fd-ab98-226b6baa5155, required when catalog_type is unity <default_cluster_id>::= !! Spark compute cluster ID; the expected format is xxxx-xxxxxx-xxxxxxxx, e.g. 0210-232334-ab0q59t3, required when catalog_type is unity <custom_clause_list>::= <custom_clause> [<custom_clause_list>...] <custom_clause>::= <name> <left_paren> <quote> <value>[{<comma><value>}...] <quote> <right_paren> <name>::= !! Teradata identifier <value>::= !! Teradata literal value <format_type>::= iceberg | deltalake
Example: Iceberg
REPLACE DATALAKE iceberg_glue EXTERNAL SECURITY CATALOG user1.iceberg_simplfied_auth, EXTERNAL SECURITY STORAGE user1.iceberg_simplfied_auth USING storage_location ('<Storage Location>') storage_region ('us-west-2') catalog_type ('glue') TABLE_FORMAT iceberg;
Example: Delta Lake
REPLACE DATALAKE deltalake_glue EXTERNAL SECURITY CATALOG user1.iceberg_simplfied_auth, EXTERNAL SECURITY STORAGE user1.iceberg_simplfied_auth USING storage_location ('<Storage Location>') storage_region ('us-west-2') catalog_type ('glue') TABLE_FORMAT deltalake;