Task Management

This section describes how to create collection tasks by configuring metadata collection policies. Different types of data sources require different collection policies. Metadata management allows users to collect the technical metadata using the configured collection policies.

Prerequisites

Metadata collection supports various data source types. For DWS, DLI, MRS HBase, MRS Hive, RDS (MySQL and PostgresSQL), and ORACLE data sources, you need to create a data connection in Management Center.

Entry

To create a collection task, you must select a directory that stores the collection task to be created. For details, see Figure 1.

Figure 1 Directory that stores the collection task to be created

Figure 2 shows the entries for creating tasks.

Figure 2 Entries for creating a collection task

Creating a Collection Task

  1. Log in to the DGC console, select a DGC instance, and click Access.

    On the displayed page, click the Workspaces tab. In the workspace list, locate the required workspace.

  1. Click Data Assets of the corresponding workspace to navigate to the Data Assets console.
  1. Choose Task Management from the left navigation bar.
  2. Click Create in the upper part of the displayed page or right-click the Task name and choose Add Task from the shortcut menu. In the displayed dialog box, set parameters as prompt.
    1. Set basic parameters by referring to Table 1.
      Table 1 Parameters

      Parameter

      Description

      Task Name

      The name of the collection task, which contains 1 to 63 characters and consists of only letters, digits, and underscores (_).

      Description

      Information to better identify a collection task. The description contains up to 255 characters and consists of only letters, digits, and underscores (_).

      Select Directory

      The directory that stores collection tasks. You can select an existing one. Figure 1 describes how to create a directory.

    2. Configure data source information. For details, see Table 2.
      Table 2 Parameters

      Parameter

      Description

      Data Connection Type

      Select a data source type from the drop-down list.

      NOTE:

      Collection tasks support various data source types. For DWS, DLI, MRS HBase, MRS Hive, RDS (MySQL), and ORACLE data sources, you need to create data connections in Management Center. See Creating Data Connections.

      OBS Bucket

      An OBS bucket that data to be collected belongs to. This parameter is mandatory only when the data source type is OBS.

      Data Connection Name

      • Data connection in the created data connection types. You can select a value from the drop-down list.
      • Data connection in the data connection types that are not created. Click Create to add one.

      OBS Path

      The OBS path where data to be collected resides. This parameter is mandatory only when the data source type is OBS.

      Collection Scope

      The scope of data to be collected. This parameter is displayed only when the data source type is OBS. The reason is that the OBS bucket is hierarchical.

      • If you select This folder, the collection task collects only the objects in the folder set in the OBS path.
      • If you select This folders and subfolders, the collection task collects all objects in the folder set in the OBS path, including the objects in the sub-folders.

      Collected Content

      The content of data to be collected. This parameter is displayed only when the data source type is OBS. The reason is that the OBS bucket is hierarchical.

      • If you select Folders and objects, the collection task collects folders and objects.
      • If you select Folders, the collection task collects only folders.

      Database and Schema

      This parameter is displayed only when the data source type is set to DWS.

      Click Select to set the range to be scanned by the collection task. If this parameter is not set, all databases under the data connection are scanned by default.

      Click Clear to delete the selected databases and data tables.

      Namespace

      This parameter is displayed only when the data source type is set to MRS HBase.

      Click Select next to the Namespace text box to set the namespace range to be scanned by the collection task. If this parameter is not set, all namespaces under the data connection are scanned by default.

      You can click Clear to modify the selected namespace.

      Database

      The databases and data tables to be collected.

      • Click Set to set the range to be scanned by the collection task. If this parameter is not set, all databases under the data connection are scanned by default.
      • Click Set to set the range to be scanned by the collection task. If this parameter is not set, all data tables under the data connection are scanned by default. For data tables whose data connection type is MySQL or DLI, the tables to be collected can be filtered by regular expressions.
      • If neither the database nor the data table is set, the collection task scans all data tables under the data connection.
      • Click Delete to delete the selected databases and data tables.

      Data Table

      Collect Dump Task

      This parameter is displayed only when the data source type is set to DIS.

      If Yes is selected, the dump task is collected.

      Collection Channel

      This parameter is displayed only when the data source type is set to DIS.

      A DIS instance is a channel. Therefore, this parameter indicates that a channel is selected for data collection.

      Select Graph

      This parameter is displayed only when the data source type is set to GES.

      Select graphs that store structured data based on "relationships".

      Select Cluster

      This parameter is displayed only when the data source type is set to CSS.

      Select the CSS cluster for storing the data to be collected.

      You can also click Create to create a CSS cluster. After the CSS cluster is created, click Refresh and select the new CSS cluster.

      CDM Cluster

      To manage CloudTable/GES/CSS data connections, select an agent provided by the CDM cluster.

      You can also click Create to create an agent. After the agent is created, click Refresh and select the new agent.

      Index

      This parameter is displayed only when the data source type is set to CSS.

      Index, similar to "database" in the relational database (RDB), stores Elasticsearch data. It refers to a logical space that consists of one or more shards.

    3. Set metadata collection parameters. See Table 3.
      Table 3 Parameters for metadata collection

      Parameter

      Description

      The data source metadata has been updated.

      When metadata in a data connection changes, you can configure an update policy to set the metadata update mode in the data directory.

      Note that the configured update and deletion policies apply only to the databases and data tables configured by yourself.

      • If you select Update metadata in the data directory only, the collection task updates only the metadata that has been collected in the data directory.
      • If you select Add new metadata to the data directory only, the collection task collects only metadata that exists in the data source but does not exist in the data directory.
      • If you select Update metadata in the data directory and add metadata, the collection task fully synchronizes metadata from the data source.
      • If you select Ignore the update and addition operations, the metadata in the data source is not collected.

      The data source metadata has been updated.

      When metadata in a data connection changes, you can configure a deletion policy to set the metadata update mode in the data directory.

      • If you select Delete metadata from data directory, when some metadata in the data source is deleted, the corresponding metadata is also deleted from the data directory.
      • If you select Ignore the deletion, when some metadata in the data source has been deleted, the corresponding metadata is not deleted from the data directory.

      Timeout Interval for Collecting a Data Record

      This parameter is displayed only when the data source type is DWS.

      If the metadata collection duration of a single data table exceeds the specified timeout interval, the metadata collection of the data table fails. If this parameter is not set, the default timeout interval is 30 minutes.

      If the size of a table is large, the metadata collection takes a long time. You can set the timeout interval and configure a collection task for each large table.

    4. Set parameters when Data Summary is selected. See Table 4 for details.
      Table 4 Parameters

      Parameter

      Description

      Full data

      Full data: If this option is selected, a data profile is generated in the data directory based on all data collected.

      This mode applies to scenarios where the data volume is less than 1 million.

      Sample data

      Full data: If this option is selected, a data profile is generated in the data directory based on all data collected.

      This mode is applicable to scenarios with a large amount of data.

      Randomly collect {}% records of data from all data

      Full data: If this option is selected, a data profile is generated in the data directory based on all data collected.

      This mode is applicable to scenarios with a large amount of data.

      Data Lake Insight Queue

      The queue that is used to obtain profile data and execute DLI SQLs.

      If you select Collect unique value the number of unique values in the collected table is calculated and displayed on the Profile tab page in the data catalog.

      Data Format

      If the data stored in the OBS bucket is in CSV format, you need to determine whether to have a table header, whether to customize a delimiter, whether to customize a reference character, and whether to customize an escape character based on the actual data attributes.

      Date Format

      If the data stored in the OBS bucket is in CSV format, configure the date format based on the actual attributes to prevent data from being incorrectly parsed.

      Timestamp Format

      If the data stored in the OBS bucket is in CSV format, configure the timestamp format based on the actual attributes to prevent data from being incorrectly parsed.

    5. Set data classification parameters as prompt.
      • If you select Data Classification and create a classification rule group or select an existing classification rule group, data will be automatically identified and a classification will be added.
      • If you select Update the data table security level based on the data classification result, the table security level must be the same as highest security level of the matched classification rules.
      • If you select Manually, no classification rule and security level are not automatically added to Column Attributes of Data Catalog under Data Map. Go to the Task Monitoring page. Locate the target instance and choose More > View Scanning Result to view the execution result of the collection task and check whether the classification result matches. Select the check box of the classification matching field and click Synchronize to manually synchronize the classification rule and security level.

      Only when you choose DWS, DLI, and MRS Hive data sources, you can add data classifications for automatic data identification. In addition, you can add classification rules only for columns in the data tables and OBS objects.

  3. Click Next and select a scheduling mode.

    Schedule once: If the execution duration of a task exceeds the configured timeout duration, the task is considered failed.

    Schedule periodically: See Table 5 for details.
    1. If Schedule once is selected, a manual task instance is generated. A manual task has no dependency on scheduling and needs to be manually triggered.
    2. If Schedule periodically is selected, a periodic instance is generated. A periodic instance is an instance snapshot that is automatically scheduled when a periodic task reaches the scheduled execution time.
    3. When a periodic task is scheduled once, an instance workflow is generated. You can perform routine O&M management on scheduled instance tasks, such as viewing the running status, stopping and rerunning the scheduled tasks.
    Table 5 Parameters

    Parameter

    Description

    Scheduling Date

    The period during which a scheduling task takes effect

    Scheduling Cycle

    The frequency at which a scheduling task is executed. Related parameters are:

    • Minute
    • Hour
    • Day
    • Week

    Start Time

    The time at which the scheduling task starts.

    Interval

    The interval between the last scheduling end time and the next scheduling start time.

    End Time

    The time at which the scheduling task ends.

    Timeout Interval

    If the running duration of a task exceeds the timeout interval set here, the task is regarded as failed.

    Start

    If this check box is selected, the task is scheduled immediately.

  4. Click Submit. The collection task is created successfully.

Managing a Collection Task

Enter the workspace where to the collection task resides and click Data Assets. The Data Assets console is displayed.

On the Data Assets console, choose Task Management from the left navigation bar.

Then, you can view all created collection tasks.

Table 6 Parameters for managing collection tasks

Parameter

Description

Task Name

The name of a collection task.

Click a collection task name to view the collection policies and scheduling properties.

Data Source

The name of a data connection

Scheduling Status

The scheduling status of a collection task. You can click to view only tasks of the specified statuses.

Scheduling Cycle

The scheduling frequency of a collection task. You can click to view only tasks of the specified frequencies.

Description

The description of a collection task

Created By

The creator of a collection task

Last Run

Displays the latest running time of a collection task.

Operation

You can perform the following operations on a created collection task:

  • Edit: Modify the parameters that are closely related to the policies of collection tasks whose status is Started, Not Started, or Failed. The data source type cannot be modified.
  • Run: Click Run to run a collection task and view its status and related logs on the Task Monitoring page.
  • Start Scheduling: If the task status is Stopped, you can reschedule the task.
  • Stop Scheduling: This parameter is valid only for collection tasks that are scheduled periodically. If the task status is Scheduling, you can stop it.