Simplified And Traditional Chinese Conversion
The simplified and traditional Chinese conversion operator converts text between Simplified Chinese and various Traditional Chinese formats. This topic explains how to configure the simplified and traditional Chinese conversion operator.
Prerequisites
The workflow feature is available only for instances with the unstructured data feature enabled.
You have created a workflow. For more information, see Create and manage a workflow.
Permissions
In a Basic project, project administrators, developers, analysts, and custom project roles with the Dataset - Use permission can use all datasets in the project as input and output datasets for operators.
Supported file formats
The simplified and traditional Chinese conversion operator supports the following file formats: .txt, .md, .csv, .json, .xml, and .html.
Procedure
On the Dataphin homepage, choose Develop > Data Development from the top navigation bar.
On the Develop page, select your Project from the top navigation bar.
In the left-side navigation pane, choose Data Processing > Workflows. In the Workflows list, click your target workflow to open the canvas. From the Operator Library on the left, drag the simplified and traditional Chinese conversion operator to the canvas. In the simplified and traditional Chinese conversion panel on the right, configure the following parameters.
Parameter
Description
Step name
Enter a name for the operator. The name can contain any characters and must be up to 256 characters long.
Input configuration
Dataset
Select the dataset to process. You can choose a hybrid dataset or a table dataset. After selecting a dataset, you must also select a version. The first available version is selected by default.
If this operator is a downstream component of another operator, the selected dataset is typically the same as the output dataset of the upstream operator.
Input field
Select a field from the metadata table of the input dataset. The system automatically processes the input based on the field's data type:
If the field is a URL type, the system automatically fetches the linked resource and parses its structured or semi-structured content. This feature supports file formats such as .txt, .md, .csv, .json, .xml, and .html.
For a non-URL type field, the system treats its value as plain text that requires no additional parsing.
Filter condition (Optional)
Specify the filter condition by using SQL syntax. Enter only the clause that follows
WHERE. You can use a system global variable, such as the business date ${bizdate}.Operator configuration
Target language
Select the target language for the conversion. Options include Simplified Chinese, General Traditional Chinese, Traditional Chinese (Hong Kong and Macao), and Traditional Chinese (Taiwan). It defaults to Simplified Chinese.
Output configuration
Dataset
You can select Source dataset or Other datasets as the output destination. If the metadata table of the source dataset does not have a primary key, the output dataset defaults to Other datasets.
If you select Other datasets, you must also specify a dataset and its version as the output dataset. The first available version is selected by default. You can also select a different version of the source dataset.
If the input field is a URL type (which generates a file after processing), you can only select a hybrid dataset as the output dataset.
If the input field is a non-URL type (which does not generate a file after processing), you can select either a hybrid dataset or a table dataset as the output dataset.
If you select Source dataset, the operator writes the generated metadata to the metadata table of the same version of the source dataset.
File output path (Optional)
This parameter is available only when the input field is a URL type.
File output name
This parameter appears only when the input field is a URL type. The output filename follows the format
${OriginalFileName}_${TargetLanguage}.mdand cannot be modified.Loading policy
If the metadata table of the selected output dataset contains a primary key, the default option is to update on primary key conflict. If a primary key does not exist, the default option is to append data.
Append data: Appends new data to the target table. An error occurs if a primary key or constraint conflict occurs.
Update on primary key conflict: If a primary key or constraint conflict occurs, the system deletes the existing row that has the same primary key and then inserts the new data.
Overwrite: Deletes all existing data in the target table before writing the new data.
NoteWhen you select Source dataset as the output dataset, the only available loading policy is Update on primary key conflict.
Field mapping
If the input field is a URL type, the simplified and traditional Chinese conversion operator outputs a fixed field named
markdown_url, which contains the URL of the converted document.If the input field is a non-URL type, the simplified and traditional Chinese conversion operator outputs a fixed field named
processed_text, which contains the converted text.
By default, the operator maps its output fields to fields with the same names in the output dataset. You can also manually select target fields for custom mapping. In addition, you can map passthrough fields from the source dataset to the target dataset. You can manage field mappings in the following ways:
Add output field: Adds a new, empty row for field mapping. This option is available only when the output is set to Other datasets.
Batch mapping: Click to choose batch manual mapping, map by name, or map by position. This option is available only when the output is set to Other datasets.
Delete: Click the Delete icon to remove the field mapping row. You cannot delete mappings for fixed output fields.
After completing the configuration, click Save in the top menu bar of the canvas.
After configuring an operator, you can continue to build your workflow by connecting upstream or downstream operators.