All Products
Search
Document Center

AnalyticDB:Lake storage

Last Updated:Apr 07, 2026

Lake storage is a fully managed storage layer in AnalyticDB for MySQL that handles data lake construction, metadata governance, and storage optimization automatically. Use it when you need a single layer that supports both offline batch processing and real-time analytics without managing the underlying infrastructure.

With lake storage, you can:

  • Store structured table data in open formats (Iceberg, Paimon) alongside unstructured file objects in a single layer.

  • Create, query, and manage lake storage tables from the XIHE and Spark engines.

  • Apply the same permission and lifecycle controls to lake storage tables as to internal tables.

  • Ingest data and run multi-engine queries without provisioning or maintaining storage infrastructure.

Important

Lake storage is in invitational preview. To use this feature, submit a ticket to contact technical support.submit a ticket

Prerequisites

Before you begin, make sure you have an AnalyticDB for MySQL Enterprise Edition, Basic Edition, or Data Lakehouse Edition cluster.

Billing

Lake storage charges are based on data volume and usage duration on a pay-as-you-go basis. Reading from or writing to a lake storage also generates request fees for the number of PUT and GET requests.

For pricing details, see Enterprise Edition and Basic Edition pricing and Data Lakehouse Edition pricing.

Limits

Limit

Details

Lake storages per region

Maximum 5 per Alibaba Cloud account.

Lake storage name

Auto-generated in the format adb-lake-RegionID-RandomString. Globally unique; cannot be changed after creation.

Storage usage display

Display has a delay. Data volume is not visible immediately after data is written.

Backup and recovery

The AnalyticDB for MySQL backup and recovery feature does not support data in lake storage.

Deletion condition

All data in the lake storage must be deleted before you can delete the lake storage.

Create a lake storage

  1. Log on to the AnalyticDB for MySQL console. In the upper-left corner, select a region. In the left-side navigation pane, click Clusters. Find the target cluster and click the cluster ID.

  2. In the left-side navigation pane, choose Data Management > Lake Storages.

  3. In the upper-right corner, click Create Lake Storage.

  4. In the Create Lake Storage dialog box, click OK. The system auto-generates the lake storage name in the format adb-lake-RegionID-RandomString. The name cannot be changed after creation.

  5. (Optional) Add a description to distinguish between lake storages used in different business scenarios.

    1. In the Lake Storage Description column, click the image icon.

    2. In the Change Lake Storage Description dialog box, enter a description and click OK.

After the lake storage is created, AnalyticDB for MySQL automatically creates an OSS bucket in the same region with the same name as the lake storage. To view this bucket in the OSS console:

  1. Log on to the OSS console

  2. In the left-side navigation pane, click the image icon next to Favorite Paths.

  3. In the Add Favorite Path dialog box, configure the following settings and click OK:

    • Adding Method: Select Add from other authorized buckets.

    • Region: The region where the AnalyticDB for MySQL cluster resides.

    • Bucket: Enter the lake storage name.

Use lake storage

A lake storage table is a fully managed table in Iceberg or Paimon format. After creation, the system assigns a unique path to the table: oss://<LakeStorageName>/lakehouse/default/tables/<table_uuid>.

For example, a table named test_iceberg_tbl stored in oss://adb-lake-cn-shanghai-6gml****/lakehouse/default/tables/b22cd225-528d-421c-a2****.

Both the XIHE and Spark engines support reading from and writing to lake storage tables. The adb_lake_bucket parameter controls which lake storage a table uses:

Where adb_lake_bucket is set

Effect

In CREATE DATABASE only

All tables in the database use that lake storage. No need to specify it again at the table level.

In CREATE TABLE only (not set at database level)

That table uses the specified lake storage. Required — omitting it causes an error.

In both CREATE DATABASE and CREATE TABLE

The table uses the lake storage from CREATE TABLE. Other tables in the database use the lake storage from CREATE DATABASE.

Read from and write to a lake storage table using Spark SQL

Prerequisites

The cluster kernel version must be 3.2.3.0 or later.

To view and update the cluster version, log on to the AnalyticDB for MySQL console and go to the Configuration Information section on the Cluster Information page. For details, see View and update the minor version of a cluster.

Procedure

  1. Go to Data Development.

    1. Log on to the AnalyticDB for MySQL console. In the upper-left corner, select a region. In the left-side navigation pane, click Clusters. Find the target cluster and click the cluster ID.

    2. In the left-side navigation pane, choose Job Development > SQL Development.

    3. On the SQLConsole tab, select the Spark engine and a resource group (job resource group or interactive resource group with Spark).

  2. Create a database and an Iceberg table.

    1. Create a database.

      CREATE DATABASE adb_external_db_iceberg 
      WITH DBPROPERTIES ('adb_lake_bucket' = 'adb-lake-cn-shanghai-6gml****');
    2. Enable lake storage and create an Iceberg table.

      SET spark.adb.lakehouse.enabled=true; 
      CREATE TABLE adb_external_db_iceberg.test_iceberg_tbl ( 
        id   int, 
        name string, 
        age  int 
      ) USING iceberg 
      PARTITIONED BY (age) 
      TBLPROPERTIES ('adb_lake_bucket' = 'adb-lake-cn-shanghai-6gml****'
      );

      For adb_lake_bucket scope behavior, see the parameter table above.

  3. Write data to the Iceberg table.

    SET spark.adb.lakehouse.enabled=true;
    INSERT INTO adb_external_db_iceberg.test_iceberg_tbl VALUES (1, 'lisa', 10), (2, 'jams', 10);
  4. (Optional) Delete rows from the Iceberg table.

    SET spark.adb.lakehouse.enabled=true;
    DELETE FROM adb_external_db_iceberg.test_iceberg_tbl WHERE id = 1;
    DELETE FROM adb_external_db_iceberg.test_iceberg_tbl WHERE age = 20;
  5. Query data from the Iceberg table.

    SET spark.adb.lakehouse.enabled=true;
    SELECT * FROM adb_external_db_iceberg.test_iceberg_tbl;

    Expected output:

    +---+----+---+
    |id |name|age|
    +---+----+---+
    |1  |anna|10 |
    |2  |jams|20 |
    +---+----+---+
  6. (Optional) Drop the Iceberg table. The following statement removes the table from AnalyticDB for MySQL and deletes its data from OSS.

    SET spark.adb.lakehouse.enabled=true;
    DROP TABLE adb_external_db_iceberg.test_iceberg_tbl;

Read from and write to a lake storage table using XIHE SQL

Prerequisites

The cluster kernel version must be 3.2.5.3 or later.

To view and update the cluster version, log on to the AnalyticDB for MySQL console and go to the Configuration Information section on the Cluster Information page. For details, see View and update the minor version of a cluster.
Important

The DELETE statement cannot delete individual rows from a XIHE lake storage table. To remove data, drop the entire table.

Procedure

  1. Go to Data Development.

    1. Log on to the AnalyticDB for MySQL console. In the upper-left corner, select a region. In the left-side navigation pane, click Clusters. Find the target cluster and click the cluster ID.

    2. In the left-side navigation pane, choose Job Development > SQL Development.

    3. In the SQLConsole window, select the XIHE engine and an interactive resource group.

  2. Create an external database and an Iceberg external table.

    1. Create an external database.

      CREATE EXTERNAL DATABASE test_db 
      WITH DBPROPERTIES ('adb_lake_bucket' = 'adb-lake-cn-shanghai-6gml****');
  3. Create an Iceberg external table.

    CREATE TABLE test_db.test_iceberg_tbl ( 
      id   int,
      name string 
     ) PARTITIONED BY (age int) 
    STORED AS ICEBERG 
    TBLPROPERTIES ( 
      'catalog_type'    = 'ADB',
      'adb_lake_bucket' = 'adb-lake-cn-shanghai-6gml****' );

    The following table describes the parameters.

    Parameter

    Description

    catalog_type

    The catalog type. Set to ADB.

    adb_lake_bucket

    The lake storage for this table. For scope behavior, see the parameter table above.

  4. Write data to the Iceberg table.

    INSERT INTO test_db.test_iceberg_tbl SELECT 1, 'anna', 10;
    INSERT INTO test_db.test_iceberg_tbl SELECT 2, 'jams', 20;
  5. Query data from the Iceberg table.

    SELECT * FROM test_db.test_iceberg_tbl;

    Expected output:

    +---+----+---+
    |id |name|age|
    +---+----+---+
    |1  |anna|10 |
    |2  |jams|20 |
    +---+----+---+
  6. (Optional) Drop the Iceberg external table. The following statement removes the table from AnalyticDB for MySQL and deletes its data from OSS.

    DROP TABLE test_db.test_iceberg_tbl;

Query data volume

  1. In the left-side navigation pane, choose Data Management > Lake Storages.

  2. In the Storage Size column, view the data volume of the target lake storage.

Important

Storage usage display has a delay. Data volume is not visible immediately after data is written.

Delete a lake storage

Important

Delete all data in the lake storage before proceeding. If any data remains, the deletion fails.

  1. In the left-side navigation pane, choose Data Management > Lake Storages.

  2. In the Actions column of the target lake storage, click Delete.

  3. In the Delete dialog box, click OK.

What's next