All Products
Search
Document Center

Hologres:Import an on-premises file to Hologres

Last Updated:Dec 27, 2023

This topic describes how to use HoloWeb to import an on-premises file to Hologres.

Prerequisites

  • An Alibaba Cloud account is created.

  • Real-name verification is complete.

  • A Hologres instance is purchased. For more information, see Purchase a Hologres instance.

Background information

If you want to import a file to Hologres in a visualized manner by using HoloWeb, you must make sure that the file is smaller than 100 MB in size. To import files that are larger than or equal to 100 MB in size, you must execute the COPY statement. For more information, see Use the COPY statement to import or export on-premises data.

Procedure

  1. Log on to the Hologres console.

  2. In the top navigation bar, select a region from the drop-down list.

  3. In the left-side navigation pane of the Hologres console, click Go to HoloWeb to go to the HoloWeb console. Go to HoloWeb

  4. In the HoloWeb console, click Data Solution in the top navigation bar.

  5. In the left-side navigation pane, click Import On-premises File > New data import.

  6. In the Import On-premises File dialog box, configure the parameters as required in the Select Target Table step and click Next Step.Import On-premises File

    Parameter

    Description

    Job Name

    The name of the import task.

    Instance Name

    The name of the connected Hologres instance.

    Target Database

    The name of the database in the connected Hologres instance.

    Target Schema

    The name of the schema in the connected Hologres instance.

    If you have not created a schema, select the default public schema. If you have created a custom schema, you can select the custom schema.

    Destination Table

    The name of the table to which you want to import the data of the on-premises file.

    Before you import data from an on-premises file, you must create a table in the destination database to store the data of the on-premises file.

  7. In the Select File step, configure the parameters as required and click Next Step.

    Parameter

    Description

    Select File

    The on-premises file whose data you want to import.

    Only .txt, .csv, and .log files are supported.

    Delimiter

    The delimiter that is used to separate fields in the on-premises file. Valid values:

    • Comma

    • Tab

    • Semicolon

    • Space

    • |

    • #

    • &

    You can also specify a custom delimiter.

    Character Encoding

    • GBK

    • UTF-8

    • CP936

    • ISO-8859

    First Line as Header

    Specifies whether to use the first row as the table header.

  8. In the Import Overview step, click Execution.

    After you run the import task, you can view the schema, database, and table that are related to the task in the Import Overview step. You can also view the status and start time of the task in this step.