Skip to main content

Azure Data Lake Storage

An Iceberg catalog on Azure Data Lake Storage Gen2 keeps its tables under an abfss:// warehouse. The server reaches the storage account with a Microsoft Entra ID service principal or the account key, and the Iceberg REST service vends engines SAS tokens scoped to each table.

Quick start​

The example creates the catalog iceberg_adls with its warehouse in the container {container} of the storage account {account}, a PostgreSQL backend, and SAS tokens vended through adls-token. It needs a service principal with the two roles described under adls-token.

  1. Start the catalog. Open Connect → Catalogs and click Catalog. Enter iceberg_adls as the Catalog name, choose Relational as the Catalog type, and Apache Iceberg as the provider.

  2. Fill in the connection.

    FieldValue
    Catalog backendjdbc
    URIjdbc:postgresql://{postgres_host}:5432/{database}
    User, PasswordThe backend database's user and password
    StorageADLS
    Warehouseabfss://{container}@{account}.dfs.core.windows.net/warehouse
    Storage account name{account}

    Leave Storage account key empty. A key entered here is vended to engines unchanged, and it grants access to the whole storage account.

  3. Create it. Click Test connection, which checks the backend, then Create catalog.

  4. Vend SAS tokens. Open the catalog, choose the Storage credentials tab, and click Cloud. Choose adls-token as the Provider type, and enter the Storage account name, Tenant ID, Client ID and Client secret of the service principal. Save.

  1. Connect an engine. Point it at the Iceberg REST service with iceberg_adls as the warehouse, and have it ask for vended credentials. See Spark or Trino.

  2. Check it. Create a table, insert a row, and read it back. Test connection never touches the storage account.

Catalog properties​

PropertyMeaningDefault
warehouseabfss://{container}@{account}.dfs.core.windows.net/{path}(none)
azure-storage-account-nameThe storage account(none)
azure-storage-account-keyThe account key, for the server and for azure-account-key. Hidden(none)
azure-tenant-idThe service principal's tenant(none)
azure-client-idThe service principal's client ID(none)
azure-client-secretThe service principal's secret. Hidden(none)

The server reaches the storage account with the account key when one is set, and otherwise with the service principal. With neither, it uses the Azure identity of its pod. The abfs, wasb and wasbs schemes work as well as abfss.

Credentials for engines​

ProviderEngines receiveNeeds
adls-tokenA user delegation SAS, scoped to the tableA service principal with two roles
azure-account-keyThe storage account keyThe account name and key
(none)Nothing; engines bring their own credentials

A catalog with an account name and key and no credential-providers vends the key through azure-account-key without being asked to. Setting credential-providers, which adding a provider on the Storage credentials tab does, turns that off.

adls-token​

The server requests a user delegation key from the storage account with the service principal, and signs a user delegation SAS for the table's directory: read and list for a caller who may only read the table, and write, create and delete as well for one who may modify it.

PropertyMeaningDefault
azure-storage-account-nameThe storage account. Required(none)
azure-tenant-idRequired(none)
azure-client-idRequired(none)
azure-client-secretRequired(none)
adls-token-expire-in-secsLifetime of the SAS3600

The service principal needs two role assignments:

  • Storage Blob Delegator on the storage account, to request the user delegation key.
  • Storage Blob Data Contributor on the container or the warehouse path, which sets what the SAS can do. Without it the SAS is issued but grants nothing.

In this release adls-token cannot vend for a table that sets write.data.path or write.metadata.path, even to a directory inside the table's location; the request fails with HTTP 400. This is a defect in our implementation, tracked as gravitino-enterprise #2623.

azure-account-key​

Returns the storage account key to engines unchanged. The key opens every container in the account and does not expire. Use it to confirm the vending path works before setting up a service principal. It cannot be added from the Storage credentials tab; it is enabled by entering the key when creating the catalog, or set on the Advanced tab or over the API.

Troubleshooting​

HTTP 400 "No credential provider found for path": the engine asked for vended credentials and the catalog has no ADLS provider.

Requesting the SAS fails with 403: the service principal lacks Storage Blob Delegator on the storage account.

The SAS is issued but reads fail with 403: the service principal lacks a data role on the container.