All Products
Search
Document Center

Hologres:Create MaxCompute foreign tables

Last Updated:Mar 26, 2026

Use the One-click MaxCompute Table Schema Sync node in DataStudio to batch-create MaxCompute foreign tables in Hologres. Foreign tables let Hologres query MaxCompute data directly without moving it, accelerating analytics across your data warehouse.

Prerequisites

Before you begin, ensure that you have:

Background

Hologres integrates natively with MaxCompute. A common scenario: your team stores raw or aggregated data in MaxCompute and needs to run low-latency SQL queries against it from Hologres without copying the data. By creating foreign tables that map to MaxCompute tables, Hologres can run accelerated queries directly on the MaxCompute data.

The One-click MaxCompute Table Schema Sync node provides a visual interface to create multiple foreign tables in a single operation. For details on how foreign tables work, see MaxCompute foreign tables.

Create foreign tables from MaxCompute

Step 1: Create the sync node

  1. Log on to the DataWorks console. In the top navigation bar, select the target region. In the left navigation pane, choose Data Development and O&M > Data Development. Select your workspace from the drop-down list and click Go to Data Development.

  2. On the DataStudio page, click the image icon to open the Data Development page.

  3. In the top menu bar, click Create and choose New Node > Hologres > One-click MaxCompute Table Schema Sync.

  4. In the New Node dialog box, select an Engine Instance and a Path, enter a Name, and click OK.

Step 2: Configure the node

On the node configuration tab, set the parameters.

参数配置
Parameter Description
Destination Connection The Hologres instance name.
Destination Database The database in the Hologres instance where the foreign tables are created.
Schema The schema within the Hologres database. Defaults to public. Select a different schema if you have created one.
Type The source data type. Currently, only MaxCompute is supported.
Server List The foreign data wrapper server name. A server named odps_server is created automatically when the Hologres instance is created. You can use this server directly. For background on the underlying mechanism, see postgres_fdw.
Source Project The MaxCompute project that contains the source tables.
Select tables to accelerate The scope of tables to sync. Choose to sync all tables in the project or select specific tables.
Table name conflict The action to take when a foreign table with the same name already exists in Hologres. Ignore: skips the conflicting table and continues creating the remaining tables. Update: updates the schema of the existing foreign table to match the MaxCompute source schema. Report error: stops the entire operation immediately.
Unsupported data type The action to take when a MaxCompute field uses a data type that Hologres does not support. Report error: the entire operation fails. Ignore: skips the unsupported fields and creates the foreign table without them.

Step 3: Save and run

  1. Click the 保存 icon to save the configuration.

  2. Click the 运行 icon to run the node. The node creates the foreign table schemas in Hologres based on the MaxCompute tables you selected.

Step 4: View the created foreign tables

  1. In the left navigation pane, click the PG管理 icon to open the table management page.

  2. Double-click a foreign table to open its configuration tab and inspect the schema.

What's next

  • Query your MaxCompute data through Hologres using standard SQL to verify the foreign tables are working as expected.

  • To learn more about foreign table query acceleration, see MaxCompute foreign tables.