The following example shows how to create a DeltaLake DATALAKE that using GCP Managed Service Principle (AKA GCP Service Account) for the catalog connection and storage access.
Define authorization for Catalog and Storage access:
CREATE AUTHORIZATION gcs_iceberg_idp_auth
USER '<<gcp_service_account_private_key_id>>'
PASSWORD '<<gcp_service_account_private_key>>'
Create a DeltaLake DATALAKE object referencing the two AUTH objects:
CREATE DATALAKE unity_iceberg_write_02
EXTERNAL SECURITY INVOKER TRUSTED CATALOG gcp_iceberg_idp_auth ,
EXTERNAL SECURITY INVOKER TRUSTED STORAGE gcp_iceberg_idp_auth
USING
catalog_type ('unity')
catalog_location ('https://1440666423386241.1.gcp.databricks.com/api/2.1/unity-catalog/iceberg')
catalog_service_principal_type('idp_managed_principal')
unity_catalog_name ('reg_iceberg_unity_gcp')
storage_location ('gs://tdotf-dev')
project_id ('tc-otf')
client_id ('110337432395221507455')
client_email ('sa-tc-otf-000@tc-otf.iam.gserviceaccount.com')
default_cluster_id ('5410-181833-mgt9s3pw')
TABLE FORMAT iceberg ;