All Products
Search
Document Center

Data Lake Formation:Migrate from DLF-Legacy to DLF

Last Updated:Mar 26, 2026

Migrate your data catalogs from DLF-Legacy to DLF by running a Paimon clone action as a JAR job in Realtime Compute for Apache Flink. The job copies Hive tables (Parquet, ORC, or Avro format), Iceberg tables, Hudi tables, or Paimon tables from DLF-Legacy into DLF as Paimon append-only tables.

Prerequisites

Before you begin, make sure you have:

Step 1: Create a JAR job

  1. Log on to the Realtime Compute for Apache Flink console.

  2. In the list of fully managed Flink workspaces, click the name of your workspace.

  3. In the left navigation pane, choose Operation Center > Deployments.

  4. Click Deploy Job, select JAR Job, and set the following parameters.

    For a full description of deployment parameters, see Deploy a JAR job.
    ParameterDescriptionExample
    Deployment ModeFixed to Batch Mode.Batch Mode
    Deployment NameA name for the JAR job.migrate_paimon
    Engine VersionThe Flink engine version.vvr-8.0.11-flink-1.17
    JAR URIUpload the paimon-flink-action-1.3-SNAPSHOT-for-clone-20250909.jar package. If you have uploaded it before, select it from the drop-down list.
    Entry Point ClassThe entry point class of the JAR.Leave blank
    Entry Point Main ArgumentsParameters passed to the main method. Set in step 2.Leave blank for now
    Additional DependenciesUpload the paimon-ali-vvr-8.0-vvp-1.3-ali-SNAPSHOT-for-clone-20250909.jar package. If you have uploaded it before, select it from the drop-down list.
  5. Click Deploy.

Step 2: Configure and start the job

A single Flink job can migrate an entire catalog, an entire database, or a single table. The scope depends on which parameters you set. The table below covers all parameters; see Migration scope for which ones to omit.

  1. In the Deployments list, find the JAR job and click Details.

  2. On the Deployment Details page, click Edit and fill in the Entry Point Main Arguments field using the template below. Use the same template for both Hive and Paimon source tables. The only difference is the value of --clone_from.

    Important

    Keep your AccessKey secret confidential. It is only displayed once at creation and cannot be retrieved later.

    Parameter reference

    ParameterDescriptionRequiredExample
    parallelismParallelism of the Flink job.No16
    database-nameName of the source DLF-Legacy database.Nomy_database
    table-nameName of the source DLF-Legacy table.Nomy_table
    warehouseOSS path of the source DLF-Legacy data catalog. Format: oss://<bucket>/<object>. Find your bucket and object in the OSS console.Yesoss://my-bucket/my-path
    dlf.catalog.idID of the DLF-Legacy data catalog. Find it in the DLF-Legacy console. See Data Catalog.Yes
    dlf.catalog.accessKeyIdAccessKey ID for DLF-Legacy. See Create an AccessKey.Yes
    dlf.catalog.accessKeySecretAccessKey secret for DLF-Legacy.Yes
    dlf.catalog.endpointDLF-Legacy service endpoint. See Regions and endpoints.Yesdlf-vpc.cn-hangzhou.aliyuncs.com
    dlf.catalog.regionRegion of DLF-Legacy. Must match dlf.catalog.endpoint. See Regions and endpoints.Yescn-hangzhou
    fs.oss.endpointOSS service endpoint. See Regions and endpoints.YesOSS: oss-cn-hangzhou-internal.aliyuncs.com; OSS-HDFS: cn-hangzhou.oss-dls.aliyuncs.com
    fs.oss.accessKeyIdAccessKey ID with read and write permissions on OSS. See Create an AccessKey.Yes
    fs.oss.accessKeySecretAccessKey secret with read and write permissions on OSS.Yes
    target-database-nameName of the target database in DLF.Notarget_database
    target-table-nameName of the target table in DLF.Notarget_table
    target-warehouseName of the target data catalog in DLF. Find it in the DLF console. See Data Catalog.Yes
    dlf.next.endpointDLF service endpoint. See Endpoints.Yescn-hangzhou-vpc.dlf.aliyuncs.com
    dlf.access-key-idAccessKey ID for DLF. See Create an AccessKey.Yes
    dlf.access-key-secretAccessKey secret for DLF.Yes
    clone_fromSource table type.Yes'hive' or 'paimon'
    filter-specPartition filter for selective cloning.Nodt = '2024-10-01'

    Clone Hive tables

    The source tables can be Hive tables (such as Parquet, ORC, and Avro), Iceberg tables, or Hudi tables. After migration, they are converted into Paimon append-only tables.

    clone
    --parallelism '<parallelism>'
    --database '<database-name>'
    --table '<table-name>'
    --catalog_conf 'metastore=dlf'
    --catalog_conf "warehouse=<warehouse>"
    --catalog_conf 'dlf.catalog.id=<dlf.catalog.id>' 
    --catalog_conf 'dlf.catalog.accessKeyId=<dlf.catalog.accessKeyId>'
    --catalog_conf 'dlf.catalog.accessKeySecret=<dlf.catalog.accessKeySecret>'
    --catalog_conf 'dlf.catalog.endpoint=<dlf.catalog.endpoint>'
    --catalog_conf 'dlf.catalog.region=<dlf.catalog.region>'
    --catalog_conf 'fs.oss.endpoint=<fs.oss.endpoint>'
    --catalog_conf 'fs.oss.accessKeyId=<fs.oss.accessKeyId>'
    --catalog_conf 'fs.oss.accessKeySecret=<fs.oss.accessKeySecret>'
    --target_database '<target-database-name>'
    --target_table '<target-table-name>'
    --target_catalog_conf 'metastore=rest'
    --target_catalog_conf 'warehouse=<target-warehouse>'
    --target_catalog_conf 'uri=<dlf.next.endpoint>'
    --target_catalog_conf 'token.provider=dlf'
    --target_catalog_conf 'dlf.access-key-id=<dlf.access-key-id>'
    --target_catalog_conf 'dlf.access-key-secret=<dlf.access-key-secret>'
    --clone_from 'hive'
    --where '<filter-spec>'

    Clone Paimon tables

    clone
    --parallelism '<parallelism>'
    --database '<database-name>'
    --table '<table-name>'
    --catalog_conf 'metastore=dlf'
    --catalog_conf "warehouse=<warehouse>"
    --catalog_conf 'dlf.catalog.id=<dlf.catalog.id>' 
    --catalog_conf 'dlf.catalog.accessKeyId=<dlf.catalog.accessKeyId>'
    --catalog_conf 'dlf.catalog.accessKeySecret=<dlf.catalog.accessKeySecret>'
    --catalog_conf 'dlf.catalog.endpoint=<dlf.catalog.endpoint>'
    --catalog_conf 'dlf.catalog.region=<dlf.catalog.region>'
    --catalog_conf 'fs.oss.endpoint=<fs.oss.endpoint>'
    --catalog_conf 'fs.oss.accessKeyId=<fs.oss.accessKeyId>'
    --catalog_conf 'fs.oss.accessKeySecret=<fs.oss.accessKeySecret>'
    --target_database '<target-database-name>'
    --target_table '<target-table-name>'
    --target_catalog_conf 'metastore=rest'
    --target_catalog_conf 'warehouse=<target-warehouse>'
    --target_catalog_conf 'uri=<dlf.next.endpoint>'
    --target_catalog_conf 'token.provider=dlf'
    --target_catalog_conf 'dlf.access-key-id=<dlf.access-key-id>'
    --target_catalog_conf 'dlf.access-key-secret=<dlf.access-key-secret>'
    --clone_from 'paimon'
    --where '<filter-spec>'

Migration scope

Control the migration scope by including or omitting specific parameters.

GoalOmitOptional
Migrate a single tableSet --where to clone specific partitions
Migrate an entire database--table and --target_tableUse --excluded_tables to skip specific tables
Migrate an entire catalog--database, --target_database, --table, and --target_tableUse --excluded_tables to skip specific tables

--excluded_tables accepts a comma-separated list of database.table pairs (example: my_db.my_tbl,my_db2.my_tbl2). Do not set this parameter for single-table migrations.

  1. Click Save.

  2. On the Deployments page, find the JAR job and click Start. Accept the default start parameters.

Step 3: Verify the migration

When the job status changes to Finished, verify the result in both consoles.

  1. Open the DLF-Legacy console and note the structure of the source catalog, databases, and tables you migrated.

  2. Open the DLF console and confirm the following based on your migration scope:

    Migration scopeWhat to check in DLF
    Entire catalogAll databases and tables exist; table count matches DLF-Legacy
    Entire databaseAll tables in the database exist; table count and schemas match DLF-Legacy
    Single tableThe table exists; the schema (column names, data types, and partition fields) matches DLF-Legacy
  3. Open a representative table in the DLF console and compare its schema and partition list with the corresponding table in DLF-Legacy to confirm the data was cloned correctly.