When you need to query MaxCompute data from Hologres without migrating it, create Hologres foreign tables that mirror your MaxCompute table schemas. The One-Click MaxCompute Schema Sync node lets you do this in batch — without writing SQL manually.
How it works
The node reads your MaxCompute table schemas and runs IMPORT FOREIGN SCHEMA statements to create matching foreign tables in Hologres. These foreign tables are backed by the odps_server foreign server, which is pre-created in the Hologres backend using the postgres_fdw extension. After the sync runs, Hologres queries on those foreign tables are accelerated against the underlying MaxCompute data — no data movement required.
Limitations
This node syncs MaxCompute internal tables only. External tables and views are not supported, because the underlying postgres_fdw mechanism can only map internal MaxCompute table schemas to Hologres foreign tables. If your source data is in an external table or view, access it through other Hologres-MaxCompute integration methods.
Prerequisites
Before you begin, make sure you have:
-
A Hologres instance with a target database and schema
-
A MaxCompute project containing the source tables
-
A Resource Group for Scheduling that can reach both data sources (required if your data sources are on a public network or in a Virtual Private Cloud (VPC)). For more information, see Network connectivity solutions.
Configure and run the node
Configure the node
On the edit page of the One-Click MaxCompute Schema Sync node, set the following parameters.
| Parameter | Description |
|---|---|
| Target connection | The target Hologres instance. From the Target Management pane on the right, you can open the HoloWeb console (Instance Monitoring), Slow Queries, Active Connections, DB Authorization, and User Management pages. |
| Target database | The database within the selected Hologres instance. |
| Schema | The schema in the Hologres database. Defaults to public. |
| Type | Currently, only Hologres foreign tables created from MaxCompute source tables are supported. |
| Server list | The server that contains the source tables. Use odps_server, which is pre-created in the Hologres backend. |
| Source project | The MaxCompute project that contains the source tables. |
| Select tables to be accelerated | Choose which source tables to sync:<br>- Accelerate all tables: Creates foreign tables for all tables in the source project.<br>- Accelerate some tables: Creates foreign tables for a subset of tables. Enter a keyword to search — the search uses fuzzy matching and returns all tables whose names contain the keyword. |
| Table name conflict | Action to take if a foreign table with the same name already exists in Hologres:<br>- Ignore the table and continue to create other tables: Skips the conflicting table and continues creating the remaining ones.<br>- Update the existing table.<br>- Report an error and stop: Stops the entire sync task when the first conflict is detected. |
| Unsupported data type | Action to take when a source column uses a data type that Hologres does not support:<br>- Report an error and fail the import: Stops table creation for that table.<br>- Ignore the unsupported fields: Creates the table but omits columns with unsupported data types. |
Run the sync task
-
In the Run Configuration pane, select and configure a resource group.
To estimate the compute resources needed, click calculate the CUs. The default is
0.25CU. -
On the toolbar, click Save, then click Run.
Schedule and deploy
To run the sync on a recurring schedule:
-
Configure the node's scheduling properties. For more information, see Node scheduling configuration.
-
Deploy the node. For more information, see Node and workflow deployment.
-
Monitor periodic task runs in the Operation Center. For more information, see Getting started.
What's next
After the foreign tables are created, query MaxCompute data directly through the Hologres foreign tables. For more information, see Accelerate queries on MaxCompute data using foreign tables.