This topic describes how to use the one-click table schema sync feature in DataStudio to create Hologres foreign tables in a batch.
Prerequisites
-
You have activated DataWorks and created a DataWorks workspace. For more information, see Create a workspace.
-
You have activated Hologres and attached it to the DataWorks workspace. For more information, see Attach a Hologres instance.
Background information
Hologres connects seamlessly with MaxCompute. You can create foreign tables to speed up queries on MaxCompute data. For more information, see Accelerate queries on MaxCompute data using foreign tables.
DataStudio provides the One-click MaxCompute Table Schema Sync feature. This feature lets you create foreign tables in a batch through a visual interface.
Procedure
-
Create a One-click MaxCompute Table Schema Sync node.
Go to the DataStudio page.
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Development.
-
In the navigation pane on the left of the DataStudio page, click the
icon to open the Data Development page. -
In the top menu bar, click Create and choose New Node > Hologres > One-click MaxCompute Table Schema Sync.
-
In the New Node dialog box, select an Engine Instance and a Path, enter a Name, and click OK.
-
On the node configuration tab, configure the parameters.

Parameter
Description
Destination Connection
The instance name of Hologres.
Destination Database
The name of the database in the Hologres instance.
Schema
The name of the schema in the Hologres database. The default value is public. If you have created a new schema, you can select it.
Type
Currently, only MaxCompute is supported.
Server List
The server name. A server named odps_server is automatically created when the Hologres instance is created. You can call this server directly. For more information about the underlying principles, see postgres_fdw.
Source Project
The name of the MaxCompute project.
Select tables to accelerate
You can choose to accelerate the entire database or only some tables, as needed.
Table name conflict
The policy to apply if a table name conflict occurs during table creation. The following policies are available:
-
Ignore: Continues to create other tables.
-
Update: Modifies the table with the same name.
-
Report error: Stops the creation process.
Unsupported data type
The following policies apply to unsupported data types when you create a table:
-
Report error: The import fails.
-
Ignore: Skips the unsupported fields.
-
-
On the configuration tab of the One-click MaxCompute Table Schema Sync node, click the
icon to save the configuration. -
On the configuration tab of the One-click MaxCompute Table Schema Sync node, click the
icon to create the foreign table schemas in a batch. -
View the batch-created foreign tables.
-
In the navigation pane on the left, click the
icon to open the table management page. -
Double-click the foreign table that you want to view. The configuration tab for the table opens.
-