Create a data collection task

Updated at:

Unstructured data collection centralizes unstructured files from different locations to a specified destination, such as OSS or a data lake. It is the first step in processing unstructured data and simplifies subsequent operations. This topic describes how to create a data collection task.

Limitations

  • You can use dataset input and output components only after you purchase the unstructured data feature for the current instance.

  • Currently, dataset input and dataset output components can only be created in Basic projects.

Permissions

The following project roles can use all datasets within a project for dataset input and output:

  • Dev and Basic projects: project administrator, developer, and analyst.

  • Prod projects: project administrator and O&M.

  • Custom project roles with the Dataset - Use permission.

Procedure

Step 1: Create a data collection task

  1. In the top navigation bar of the Dataphin homepage, choose Develop > Data Integration.

  2. In the top navigation bar of the Data Integration page, select a Project. If you are in Dev-Prod mode, you also need to select an Environment.

  3. In the left-side navigation pane, choose Unstructured Data > Data Collection. On the Data Collection list page, click the image icon to open the Create Data Collection Task dialog box.

  4. In the Create Data Collection Task dialog box, configure the following parameters.

    Parameter

    Description

    Task Name

    The name can be up to 64 characters long and must not contain the following special characters: vertical bar (|), forward slash (/), backslash (\), colon (:), question mark (?), angle brackets (<>), asterisk (*), or single quotation mark (').

    Scheduling Type

    Select a scheduling type for the pipeline. The scheduling type can be:

    • Periodic Node: A task that runs at scheduled intervals.

    • Manual Node: A task that has no dependencies and must be triggered manually.

    Description

    Enter a brief description for the data collection task, up to 1,000 characters.

    Select Directory

    Select the directory to store the task.

    If no directory exists, you can click New Folder. To do so, follow these steps:

    1. Above the compute task list on the left, click the image icon to open the New Folder dialog box.

    2. In the New Folder dialog box, enter a folder Name and, as needed, select a directory as the location.

    3. Click OK.

  5. Click OK.

Step 2: Configure input and output components

From the Component Library on the left, drag input and output components to the canvas and configure them in the right-side panel.

Input components

File Input

Parameter

Description

Step Name

Enter a step name of up to 64 characters. The name can contain Chinese characters, lowercase letters, digits, and underscores (_).

Data Source Type

You can select OSS, Amazon S3, OBS, or FTP.

Data Source

You can select only a data source for which you have read permission. If no suitable data source is available, click New Data Source to create one. For more information, see Create an OSS data source, Create an Amazon S3 data source, and Create an FTP data source.

Click the image icon to copy the data source name.

object

You can use wildcards and specify multiple objects. For example, category/* reads all objects whose names start with category/.

Note

This parameter applies only when the data source type is OSS, Amazon S3, or OBS.

File Path

You can enter multiple file paths, separated by semicolons (;). Wildcards are supported. For example, /bazhen/* reads all files in the bazhen directory.

Note

This parameter applies only when the data source type is FTP.

Output Field

The output fields are derived from the metadata of the source files. You can search for fields by name.

Local File Input
Note

Only manual tasks support local file input.

Parameter

Description

Step Name

Enter a step name of up to 64 characters. The name can contain Chinese characters, lowercase letters, digits, and underscores (_).

File Path

Click Select File or drag one or more files to the file path area. The size of a single file cannot exceed 500 MB.

Output Field

The output fields are parsed from the metadata of the uploaded files. You can search for fields by name.

Dataset Input

Parameter

Description

Step Name

Enter a step name of up to 64 characters. The name can contain Chinese characters, lowercase letters, digits, and underscores (_).

Dataset

You can select a File Dataset or a Hybrid Dataset from the current project. You can search for a dataset by name. After selecting a dataset, you must also select its Version. Click the image icon to copy the current dataset name. To create a dataset, see Create and manage datasets.

Object

You can use wildcards and specify multiple objects. For example, category/* reads all objects whose names start with category/.

Output Field

The output fields are parsed from the metadata of the files in the specified path. You can search for fields by name.

WeCom conversation archive

You can then aggregate and analyze the data along with speech-to-text transcriptions, text analytics, CRM data, and order data for use cases such as customer tagging.

Parameter

Description

Step Name

Enter a step name of up to 64 characters. The name can contain Chinese characters, lowercase letters, digits, and underscores (_).

Data Source

You can only select a WeCom conversation archive data source for which you have read permission. To create a new data source, see Create a WeCom conversation archive data source.

Output Field

The output fields are parsed from the WeCom conversation archive messages. You can search for fields by name. You can configure field mappings in the downstream Dataset Output component.

Note
  • The component supports collecting text, images, voice, video, files, mini-programs, links, mixed messages, chat records, online documents, and WeDrive files. By default, the component collects all supported message types.

  • In the collection results, each row corresponds to a content item. Standard messages are retained as a single row, while mixed messages and chat records are split into multiple rows by content item, with the original order preserved.

  • For mini-programs and links, the component collects only basic sharing information; it does not read or download the target page content or associated images. For online documents, it collects only the title, creator, and link, not the body content. For WeDrive files, it collects only the filename and link and does not download the files.

Output components

File Output

Parameter

Description

Step Name

The default name is File Output_1, which you can change. The name can contain Chinese characters, letters, underscores (_), and digits.

Data Source Type

You can select OSS, Amazon S3, OBS, or FTP.

Data Source

You can select only a data source for which you have write permission. If no suitable data source is available, click New Data Source to create one. For more information, see Create an OSS data source, Create an Amazon S3 data source, and Create an FTP data source.

Click the image icon to copy the data source name.

object prefix

Specify only the directory path. The destination filename defaults to the source filename.

Note

This parameter applies only when the data source type is OSS, Amazon S3, or OBS.

File Path

Specify only a single file path. The destination filename defaults to the source filename.

Note

This parameter applies only when the data source type is FTP.

Load Policy

For OSS, Amazon S3, OBS, and FTP data sources, you can choose to overwrite data, append data, or report an error on filename conflicts.

  • Overwrite Data: Before writing, the task deletes any files in the directory that have conflicting names and then adds the new data files.

  • Append Data: The task adds new data files directly to the destination directory. It uses a random UUID suffix to ensure filenames do not conflict.

  • Error on Filename Conflict: If a file with a conflicting name exists in the directory, the task reports an error at runtime.

Dataset Output

Parameter

Description

Step Name

The default name is Dataset Output_1, which you can change. The name can contain Chinese characters, letters, underscores (_), and digits.

Dataset

If the upstream component is WeCom conversation archive, you can select only a Hybrid Dataset from the current project. Otherwise, you can select a File Dataset or a Hybrid Dataset from the current project. You can search for a dataset by name. After selecting a dataset, you must also select its Version. Click the image icon to copy the current dataset name. To create a dataset, see Create and manage datasets.

Object Prefix (Optional)

Specify only the directory path. The destination filename defaults to the source filename.

Load Policy

  • Overwrite Data: Before writing, the task deletes any files in the directory that have conflicting names and then adds the new data files.

  • Append Data: The task adds new data files directly to the destination directory. It uses a random UUID suffix to ensure filenames do not conflict.

  • Error on Filename Conflict: If a file with a conflicting name exists in the directory, the task reports an error at runtime.

Sync Metadata

Only Hybrid Datasets support metadata synchronization. If you select Yes, you must also configure the File Path Field and Field Mapping.

File Path Field

Select a field from the dataset that is designated to hold a URL. This field will store the file path after the file is written to the dataset.

Field Mapping

You can manually map the output fields from the upstream component to the metadata fields.

  • Source Field: Displays the list of output fields from the upstream component.

  • Metadata Field: You can select a dataset field, excluding the already selected file path field. Each field can be selected only once.

Click Configure Field Mapping to perform batch operations in the Field Mapping dialog box. This supports both Map by Row and Map by Name.

  • Map by Name: Maps fields that have the same name.

  • Map by Row: Maps fields based on their row position. This is useful when source and destination fields have different names but their corresponding data needs to be mapped. Only fields in the same row are mapped.

Step 3: Configure task properties

  1. Click Scheduling Settings on the canvas toolbar to open the Scheduling Settings tab in the Properties panel.

  2. In the Scheduling Settings panel, configure the task's Basic Information, Runtime Parameters, Scheduling Configuration, Scheduling Dependencies, Runtime Settings, and Resource Settings. The following sections describe these configurations:

    • Basic Information: The basic information for the data collection task is the same as for an offline integration task. You can configure the development owner, O&M owner, tags, and description. For more information, see Configure basic information for an offline integration pipeline.

    • Runtime Parameters: If your task uses parameter variables, you can assign values to them in the properties. The variables are then automatically replaced with their assigned values at runtime. The configuration is the same as for an offline integration task. For more information, see Configure runtime parameters for an offline pipeline.

    • Scheduling Configuration: For a periodic node, scheduling configuration defines the task's schedule in the production environment. This is the same as the scheduling configuration for an offline integration task. For more information, see Scheduling configuration for an offline integration pipeline.

    • Scheduling Dependencies: For a periodic node, scheduling dependencies define the nodes on which the data collection task depends. This is the same as the scheduling dependency for an offline integration task. For more information, see Configure scheduling dependencies for an offline pipeline.

    • Runtime Settings: You can configure a task-level timeout and a retry policy for task failures based on your business needs. This prevents resource waste from long-running tasks and improves task reliability. The configuration is the same as for an offline integration task. For more information, see Runtime configuration for offline pipeline tasks.

    • Resource Settings: You can assign a resource group to the current data collection task. The task uses the resources of this group for scheduling. The configuration is the same as for an offline integration task. For more information, see Configure resources for an offline integration pipeline task.

  3. Click the Channel Settings tab in the Properties panel to define the runtime fault tolerance, concurrency, JVM resources, and database settings for the current data collection task. The configuration is the same as for an offline integration task, but traffic monitoring is not supported. For more information, see Channel configuration for an offline integration pipeline.

Step 4: Save and submit the task

  1. Click Save on the canvas toolbar to save the data collection task.

  2. Click Submit on the canvas toolbar. In the Submission Comments dialog box, enter your comments and click OK and Submit.

    When you submit the task, Dataphin performs lineage analysis and submission checks. For more information, see Integration task submission.

Next steps

  • After creating a data collection task, you can go to the Data Collection Task List to view and manage your tasks. This list is similar to that of offline integration tasks, but the filter options differ. Filtering by source or destination table/topic/index is not supported. The source data source/project/data domain filter is changed to source data source/dataset, and the destination data source/project/data domain filter is changed to destination data source/dataset. For more information, see View the offline integration task list.

  • After a data collection task runs, you can view its run information in Data Collection Run Records. The run record list is the same as for offline integration tasks. For more information, see View and manage the run record list.

  • If your development mode is Dev-Prod mode, you need to publish the task. For more information, see Manage release tasks.

  • If your development mode is Basic mode, successfully submitted tasks can be scheduled in the production environment. You can go to Operations Center to view your published tasks. For more information, see Operations Center.