This topic describes how to use the log delivery feature to import data from Log Service to an ApsaraDB for ClickHouse cluster.

Prerequisites

  1. The SLS and ApsaraDB for ClickHouse cluster are in the same region.
  2. The destination ApsaraDB for ClickHouse cluster is created. For more information, see Create an ApsaraDB for ClickHouse table.
Note You cannot import data of the array type. For more information about the data types supported in ApsaraDB for ClickHouse, see Data types.

Procedure

  1. Log on to the ApsaraDB for ClickHouse console.
  2. On the Clusters page, click the ID of the destination cluster.
  3. In the left-side navigation pane, click Log Delivery. On the Log Delivery page, click Create Log Delivery Task.
    Note If you do not have the permissions, authorization is required when you create a log delivery task.
  4. Configure the following parameters:
    • Delivery Task Name: the name of the log delivery task. It can be any name that meets the requirements.
    • Description: the description of the log delivery task.
    • Log Service Project: the name of the Log Service project. For more information, see Log Service.
    • Logstore: the logstore to be delivered.
    • Cluster Name: the ID of the ApsaraDB for ClickHouse cluster.
    • Database Name: the database of the ApsaraDB for ClickHouse cluster.
    • Table Name: the table of the ApsaraDB for ClickHouse cluster.
    • Account Name: the account of the ApsaraDB for ClickHouse cluster.
    • Account Password: the password of the ApsaraDB for ClickHouse cluster.
    • Field Mapping: the mapping between table fields in Log Service and ApsaraDB for ClickHouse.
    • Start Time: the time when logs were written to SLS.
      Notice It is the time when logs were written to SLS, instead of the time for a table field.
    • Whether to Filter Dirty Data: We recommend that you turn on the switch. If you turn off the switch and encounter unresolved dirty data, the import task fails.
  5. After you configure the parameters and click OK, you are returned to the Log Delivery page. The newly created task is displayed on the page. You can modify, start, and terminate the task, as well as view its monitoring data. To view the errors of the task, click Monitor.