This section explains how to use OTF with the Iceberg table format, utilizing Apache Gravitino as the catalog and Cloud AWS S3 for data storage. The following statements illustrate the necessary authorizations and datalake configuration.
CREATE AUTHORIZATION gravitino_catalog_auth USER '<catalog_oauth_service_user>' PASSWORD '<catalog_oauth_service_user >';
CREATE AUTHORIZATION cloud_aws_storage_auth USER '<storage_cloud_aws_s3_access_key_id' PASSWORD '<storage_cloud_aws_s3_secret_key';
CREATE DATALAKE iceberg_gravitino_storagegrid_rest
EXTERNAL SECURITY CATALOG gravitino_catalog_auth ,
EXTERNAL SECURITY STORAGE cloud_aws_storage_auth
USING
catalog_type ('rest')
catalog_location ('http://hostname:port/iceberg')
idp_location ('http://hostname:port/oauth2/token')
idp_token_scope('test')
storage_region ('us-east-1')
storage_location ('s3://gravitino-otf/')
TABLE FORMAT iceberg ;