Querying OSS data through foreign tables provides flexibility but at the cost of query performance. One-click OSS data import copies OSS table data into a Hologres internal table through the HoloWeb visual interface, giving you better query performance without writing SQL manually.
How it works
The import runs in two phases:
-
Identify the source: Point HoloWeb to an OSS table registered in Data Lake Formation (DLF) through a foreign server.
-
Create the destination: HoloWeb generates and runs the SQL to create a Hologres internal table and load the data. After the task completes, query the internal table with standard SQL.
Prerequisites
Before you begin, make sure you have:
-
Logged on to a Hologres instance. For more information, see Log on to an instance.
-
A foreign server. For more information, see Create a foreign server.
Import OSS data
-
Log on to the Hologres Management Console.
-
In the navigation pane on the left of the top menu bar, select the desired region.
-
In the left-side navigation pane, click Go to HoloWeb.
-
Log on to the destination database. In the main menu bar, choose Metadata Management > OSS Data Lake Acceleration > One-click OSS Data Import.
-
Configure the parameters. The SQL Script automatically generates SQL statements based on your configuration. The following table describes each parameter. After configuring table-level properties, you can also set field-level properties for the imported DLF table fields, such as distribution columns, event time columns, clustering key columns, dictionary encoding columns, and bitmap columns.
WarningIf a Hologres internal table with the same name already exists, the behavior depends on the table type: - Non-partitioned table: The existing table and all its data are deleted, and a new table is created. - Partitioned table: A child partitioned table is created based on the partition key value, and data is inserted into it. The existing table and data are not deleted. If the DLF table schema differs from the existing internal table schema, an error is reported.
Section Parameter Description Default Instance Instance Name The name of the instance. — Source DLF Table Server Name The name of the foreign server. — Database Name The name of the DLF database where the OSS data resides. — Table Name The name of the OSS table to import data from. — Destination Hologres Table Database Name The name of the destination Hologres database. — Schema Name The schema in the destination database. Select from the drop-down list. public Table Name The name of the Hologres internal table to create. Auto-filled from the source table name; you can rename it. Same as source Destination Table Description A description for the Hologres internal table. — Parameter Settings GUC Parameters Parameters that control read/write parallelism. Syntax: set <GUC>=<values>;. Put each parameter on a separate line.— Import Task Fields The fields to import from the DLF table. Select specific fields or all fields. — Partition Configurations Partition Field The partition field. Select from the drop-down list. — Data Timestamp If the DLF table is partitioned by date, select a date. The system imports data from the partition with that date. — Property Storage Mode The storage mode of the internal table: Column-oriented Storage (complex queries), Row-oriented Storage (point queries and primary key scans), or Row-column Storage (complex OLAP queries, high-concurrency point queries, and point queries not based on primary keys). For more information, see Storage modes of tables: row-oriented storage, column-oriented storage, and row-column hybrid storage. Column-oriented Storage Data Lifecycle How long table data is retained. Data not updated within this period is automatically deleted after the period expires. Maximum Binlog Whether to enable binary logging for the table. Requires Hologres V0.9 or later. For more information, see Subscribe to Hologres binary logs. — Lifecycle of Binary Logs The time to live (TTL) of binary logs, in seconds. For more information, see Subscribe to Hologres binary logs. 2592000 (30 days) -
In the upper-right corner of the page, click Submit. On the One-click OSS Data Import page, view the execution details of the import task.
-
(Optional) Find the import task and click an option in the Actions column:
Action Description Details View the task details. Rerun Run the import task again. Delete Delete the import task. Execution History View the execution history of the task.
Query OSS data
After the import task completes, Hologres automatically creates the internal table. Run the following SQL statement to query the data:
SELECT * FROM <tablename>;
Replace <tablename> with the Hologres internal table name you specified when creating the import task.