Filesystem catalog Paimon external projects
You can use MaxCompute to create an external project by mapping a Paimon catalog directory in OSS. This creates a project that mirrors the standard Paimon file system hierarchy. Access permissions are based on the authorization granted to a user's RAM role for the OSS bucket, supporting read and write operations on both metadata and data in the Paimon lake format. With this catalog-level mapping, you are responsible for ensuring file system compliance and managing your own permissions and storage for files in the lake format. This approach is ideal for stream-batch integration scenarios where permissions are controllable and you can handle maintenance independently.
Deleting an external project is a physical deletion operation that clears some historical information but does not delete data in the source system. The operation can take a long time. Wait for it to complete.
Limitations
Only tables in Paimon format are supported.
Writing to Dynamic Bucket tables is not supported.
Writing to Cross Partition tables is not supported.
For more information, see Data type mapping.
Procedure
Step 1: Grant permissions to a RAM user
If you are a RAM user, ensure the following policy is attached to your account. For instructions, see Manage RAM user permissions.
AliyunMaxComputeFullAccess: Grants the permissions required to create external data sources and external projects.
Step 2: Create a FileSystem Catalog external data source
Activate OSS and create a bucket to store your Paimon data. For more information, see Quick start.
Log in to the MaxCompute console and select a region in the upper-left corner.
In the left-side navigation pane, choose .
On the External Data Source page, click Create External Data Source.
In the Create External Data Source dialog box, configure the parameters. The following tables describe the parameters.
Parameter
Required
Description
External Data Source Type
Yes
Select
FileSystem Catalog.External Data Source Name
Yes
The name of the external data source. The name must meet the following requirements:
It must start with a letter and can contain only lowercase letters, digits, and underscores (_).
It must be 128 characters or fewer.
Example:
external_fs.Description
No
Optional. A description of the external data source.
Region
Yes
Defaults to the current region.
Authentication and Authorization
Yes
Defaults to Alibaba Cloud RAM role.
Role ARN
Yes
The Alibaba Cloud Resource Name (ARN) of the RAM role. This role must have permissions to access OSS.
Log in to the RAM console.
In the left navigation bar, select .
In the Basic Information section, you can obtain the ARN.
Example:
acs:ram::124****:role/aliyunodpsdefaultrole.Storage Type
Yes
OSS
OSS-HDFS
Endpoint
Yes
The endpoint is automatically generated. For the China (Hangzhou) region, the endpoint is
oss-cn-hangzhou-internal.aliyuncs.com.Foreign Server Supplemental Properties
No
Additional properties that define how tasks that use this data source access the source system.
NoteFor information about the supported parameters, see the latest updates in the official documentation. More parameters will be gradually made available as the product evolves.
Click OK to create the external data source.
On the External Data Source page, find the data source and click Details in the Actions column to view its details.
Step 3: Create an external project
Log in to the MaxCompute console and select a region in the upper-left corner.
In the left-side navigation pane, choose .
On the External Project tab, click Create Project.
In the Create Project dialog box, configure the settings and click OK.
Parameter
Required
Description
Project Type
Yes
Defaults to external project.
Region
Yes
Defaults to the current region. This parameter cannot be modified.
Project Name (Globally Unique)
Yes
Must be 3 to 28 characters long, start with a letter, and contain only letters, digits, and underscores (_).
MaxCompute Foreign Server Type
No
Select FileSystem Catalog.
MaxCompute Foreign Server
No
Use Existing: Select an existing external data source.
Create Foreign Server: Create and use a new external data source.
MaxCompute Foreign Server Name
Yes
Use Existing: Select the name of an existing external data source from the drop-down list.
Create External Data Source: The name of the new external data source is used.
Bucket Catalog
Yes
Select the full path from the OSS bucket to the catalog-level file system directory. Example:
oss://paimon-fs/paimon-test/.Table Format
Yes
Defaults to Paimon.
Billing Method
Yes
Subscription or Pay-as-you-go.
Default Quota
Yes
Select an existing quota.
Description
No
A custom description for the project.
Step 4: Use SQL to access data
Deleting an external project does not delete the underlying data because the project is only a mapping to the data source.
However, unlike with standard external tables, running a DROP TABLE or DROP SCHEMA command in an external project sends the request to the peer service. This permanently deletes the corresponding table or database. Use DROP operations with caution.
Select a connection tool to log on to the external project.
List the schemas in the external project. By default, only the database paths that store Paimon tables are listed.
-- Enable schema syntax at the session level. SET odps.namespace.schema=true; SHOW schemas; -- The following result is returned. ID = 20250922********wbh2u7 default OKList the tables in a schema within the external project.
-- schema_name is the name of the schema displayed in the external project. USE SCHEMA <schema_name>; SHOW tables;Create a new schema in the external project.
CREATE schema <schema_name>; -- Example: CREATE schema schema_test;Use the new schema.
use schema <schema_name>; -- Example: use schema schema_test;Create a table in the schema and insert data.
Syntax:
-- Create a table. CREATE TABLE [IF NOT EXISTS] <table_name> ( <col_name> <data_type>, ... ) [COMMENT <table_comment>] [PARTITIONED BY (<col_name> <data_type>, ...)] ; -- Insert data. INSERT {INTO|OVERWRITE} TABLE <table_name> [PARTITION (<pt_spec>)] [(<col_name> [,<col_name> ...)]] <select_statement> FROM <from_statement>Example:
CREATE TABLE new_table(id INT,name STRING); INSERT INTO new_table VALUES (101,'Alice'),(102,'Bob'); -- Query the new_table table. SELECT * FROM new_table; -- The following result is returned. +------------+------------+ | id | name | +------------+------------+ | 101 | Alice | | 102 | Bob | +------------+------------+
Passing Paimon table properties
Apache Paimon provides core configuration options. When creating a Paimon table in an external project, specify these options in the TBLPROPERTIES clause of your CREATE TABLE statement.
Configuration: Add parameters prefixed with mcfed. to the TBLPROPERTIES list. The parameter names after the prefix must match the native Paimon parameter names.
Example
Create a Paimon external table with buckets, a primary key, and partitions
-
Create the table and configure its external parameters
-- Switch to your external project. You can skip this step if you are already in it. use <your external project>; -- Enable schema syntax at the session level. SET odps.namespace.schema=true; -- Select the schema to use. use schema <your schema>; CREATE TABLE oss_extable_bucket_pk_pt_bucket ( id BIGINT, name STRING, dt STRING )tblproperties ( 'mcfed.bucket'='3', -- Number of buckets 'mcfed.bucket-key'='id', -- Bucket key. Optional if a primary key is specified. "mcfed.primary-key"="dt,id", -- Primary key "mcfed.partition"="dt" -- Partition field ); -
Insert data into the external table
use <your external project>; SET odps.namespace.schema=true; use schema <your schema>; INSERT INTO oss_extable_bucket_pk_pt_bucket PARTITION (dt='2025-06-18') VALUES (1, 'Alice'),(2, 'Bob'); INSERT INTO oss_extable_bucket_pk_pt_bucket PARTITION (dt='2025-06-19') VALUES (3, 'Charlie'),(4, 'David'),(5, 'Eva'); -
Query the external table
use <your external project>; SET odps.namespace.schema=true; use schema <your schema>; SELECT * FROM oss_extable_bucket_pk_pt_bucket; -- Result: +------------+---------+------------+ | id | name | dt | +------------+---------+------------+ | 1 | Alice | 2025-06-18 | | 2 | Bob | 2025-06-18 | | 4 | David | 2025-06-19 | | 3 | Charlie | 2025-06-19 | | 5 | Eva | 2025-06-19 | +------------+---------+------------+ -
Log on to the Data Lake Formation (DLF) console, and in the upper-left corner, select a region.
View the table details in the catalog.
Data type mapping
For more information about MaxCompute data types, see Data types (Version 1.0) and Data types (Version 2.0).
Paimon data type | MaxCompute 2.0 data type | Read/write support | Description |
TINYINT | TINYINT | 8-bit signed integer. | |
SMALLINT | SMALLINT | 16-bit signed integer. | |
INT | INT | 32-bit signed integer. | |
BIGINT | BIGINT | 64-bit signed integer. | |
BINARY(MAX_LENGTH) | BINARY | Binary data type. The current maximum length is 8 MB. | |
FLOAT | FLOAT | 32-bit binary floating-point number. | |
DOUBLE | DOUBLE | 64-bit binary floating-point number. | |
DECIMAL(precision,scale) | DECIMAL(precision,scale) | Exact decimal numeric type. The default is
| |
VARCHAR(n) | VARCHAR(n) | Variable-length character type. n specifies the length and ranges from 1 to 65,535. | |
CHAR(n) | CHAR(n) | Fixed-length character type. n specifies the length and ranges from 1 to 255. | |
VARCHAR(MAX_LENGTH) | STRING | String type. The current maximum length is 8 MB. | |
DATE | DATE | Date type. The format is | |
TIME, TIME(p) | Not supported | The Paimon TIME data type represents a time without a time zone, consisting of hours, minutes, and seconds, with nanosecond precision. TIME(p) specifies the fractional-second precision from 0 to 9. The default value is 0. No corresponding type exists in MaxCompute. | |
TIMESTAMP, TIMESTAMP(p) | TIMESTAMP_NTZ | A timestamp type without a time zone that is accurate to the nanosecond. To read this data type, you must disable the native JNI bridge by running the following command: | |
TIMESTAMP WITH LOCAL TIME_ZONE(9) | TIMESTAMP |
| |
TIMESTAMP WITH LOCAL TIME_ZONE(9) | DATETIME | A timestamp type that is accurate to the nanosecond. The format is | |
BOOLEAN | BOOLEAN | A BOOLEAN type. | |
ARRAY | ARRAY | A complex type. | |
MAP | MAP | A complex type. | |
ROW | STRUCT | A complex type. | |
MULTISET<t> | Not supported | No corresponding type exists in MaxCompute. | |
VARBINARY, VARBINARY(n), BYTES | BINARY | A data type of variable-length binary strings. |