This topic describes how to deploy a JAR job in Realtime Compute for Apache Flink to migrate a Paimon FileSystem catalog to DLF.
Background
A Paimon FileSystem catalog stores table metadata on a file system such as Object Storage Service (OSS). While this works for standalone Paimon deployments, it does not integrate with centralized governance services. Data Lake Formation (DLF) provides a unified metadata catalog with access control, auditing, and cross-service discovery. Migrating to DLF lets you manage Paimon tables alongside other data assets in a single governed catalog.
This guide describes how to migrate using a Flink batch job that runs the Paimon clone action. The job reads metadata and data from your FileSystem catalog and registers it in your DLF catalog. You can migrate a single table, an entire database, or an entire catalog in one job run.
Prerequisites
Before you begin, complete the following:
Compute requirements
-
Create a workspace in Realtime Compute for Apache Flink. The migration job runs in this workspace. For setup instructions, see Activate Realtime Compute for Apache Flink. You can also open the Realtime Compute for Apache Flink management console directly.
Catalog requirements
-
Create a DLF data catalog to receive the migrated tables. For setup instructions, see Create a data catalog. You can also open the DLF console directly.
Access requirements
-
Obtain an AccessKey ID and AccessKey secret for an Alibaba Cloud account or RAM user that has read and write permissions on OSS and access to DLF. See Create an AccessKey.
The AccessKey secret is displayed only at creation time and cannot be retrieved later. Store it securely before proceeding.
Procedure
Step 1: Create a JAR job
Log on to the Realtime Compute for Apache Flink console.
In the list of fully managed Flink workspaces, click the name of your workspace.
In the left navigation pane, choose Operation Center > Deployments.
Click Deploy Job, select JAR Job, and set the following parameters.
For a full description of deployment parameters, see Deploy a JAR job.
Parameter Description Example Deployment Mode Fixed to Batch Mode. Batch Mode Deployment Name A name for the JAR job. migrate_paimon Engine Version The Flink engine version. vvr-8.0.11-flink-1.17 JAR URI Upload 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 Class The entry point class of the JAR. Leave blank Entry Point Main Arguments Parameters passed to the main method. Set in step 2. Leave blank for now Additional Dependencies Upload 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. — Click Deploy.
Step 2: Configure parameters and start the job
The Entry Point Main Arguments field controls which source catalog to read from, which target catalog to write to, and which scope to migrate.
-
On the Job O&M page, find the JAR job that you created and click Details.
-
On the Deployment Details page, click Edit in the upper-right corner.
-
Set the Entry Point Main Arguments field using the command template below, replacing placeholders with your values.
Command template
clone --parallelism '<parallelism>' --database '<database-name>' --table '<table-name>' --catalog_conf 'metastore=filesystem' --catalog_conf "warehouse=<warehouse>" --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>'Parameter reference
Configuration item
Required
Description
Example
parallelismNo
Concurrency of the job.
16database-nameNo
Name of the FileSystem catalog database to clone. Omit when migrating an entire catalog.
my_databasetable-nameNo
Name of the FileSystem catalog table to clone. Omit when migrating an entire database or catalog.
my_tablewarehouseYes
OSS path of the FileSystem catalog. Format:
oss://<bucket>/<object>. Find your bucket and object names in the OSS console.oss://my-bucket/paimon-datafs.oss.endpointYes
Endpoint of the OSS service. For OSS:
oss-cn-hangzhou-internal.aliyuncs.com. For OSS-HDFS:cn-hangzhou.oss-dls.aliyuncs.com. See Regions and endpoints.oss-cn-hangzhou-internal.aliyuncs.comfs.oss.accessKeyIdYes
AccessKey ID of the account or RAM user with read and write permissions on OSS. See Create an AccessKey.
—
fs.oss.accessKeySecretYes
AccessKey secret corresponding to
fs.oss.accessKeyId.target-database-nameNo
Name of the target DLF database. Omit when migrating an entire catalog.
target_databasetarget-table-nameNo
Name of the target DLF table. Omit when migrating an entire database or catalog.
target_tabletarget-warehouseYes
Name of the DLF data catalog to migrate into. View catalog names in the DLF console. See Data catalogs.
—
dlf.next.endpointYes
Endpoint of the DLF service. See Endpoints.
cn-hangzhou-vpc.dlf.aliyuncs.comdlf.access-key-idYes
AccessKey ID to access DLF.
—
dlf.access-key-secretYes
AccessKey secret to access DLF.
clone_fromYes
Type of source catalog. Always set to
'paimon'for this migration.paimonfilter-specNo
Partition filter condition. Omit to migrate all partitions.
dt = '2024-10-01'excluded_tablesNo
Tables to exclude from catalog or database migrations. Not applicable for single-table migrations. Format:
<db>.<table>,<db2>.<table2>.my_db.my_tbl,my_db2.my_tbl2Important-
To migrate a single table, include
--database,--table,--target_database, and--target_table. All four parameters are required. -
To migrate an entire database, include
--databaseand--target_database. Do not set--tableor--target_table. Optionally use--excluded_tablesto skip specific tables. -
To migrate an entire catalog, omit
--database,--table,--target_database, and--target_table. Optionally use--excluded_tablesto skip specific tables.
-
-
Click Save on the Deployment Details page.
-
On the Job O&M page, click Start next to the JAR job and start the job with the default parameters.
Step 3: Verify the result
After the job finishes, confirm that the migration completed successfully.
-
On the Job O&M page, wait until the job status changes to Finished.
-
Log on to the DLF console and navigate to your target data catalog.
-
Verify the migrated data based on your migration scope:
Migration scope
What to verify
Full catalog migration
The catalog structure, databases, and tables in DLF match those in the source FileSystem catalog.
Full database migration
The database and table structures in DLF match those in the source FileSystem catalog.
Single table migration
The table structure in DLF matches that in the source FileSystem catalog.
Troubleshooting
|
Symptom |
Likely cause |
Resolution |
|
Job fails immediately after starting |
Incorrect JAR URI or missing additional dependency JAR. |
Re-upload both JAR files and confirm the versions match. |
|
Job finishes but tables are missing in DLF |
The |
In the DLF console, verify the warehouse URI configured for your data catalog and update the |
|
Authentication errors during the job |
Incorrect AccessKey ID or AccessKey secret, or insufficient RAM permissions. |
Confirm the AccessKey credentials are valid and that the associated account or RAM user has both OSS read/write permissions and DLF access permissions. |
|
Table structure in DLF does not match the source after migration |
The source table schema changed between migration runs. |
Re-run the migration job or manually update the table schema in DLF to match the source. |