String replace

Updated at:

You can use the String Replace node to replace values in string fields.

Prerequisites

Before you configure a String Replace node, you must configure a corresponding input node. For more information, see Data sources supported by Real-time Synchronization.

Procedure

  1. Log on to the DataWorks console. In the target region, click Data Development and O&M > Data Development in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Development.

  2. Hover over the 新建 icon and choose Create Node > Data Integration > Real-time Synchronization.

    Alternatively, expand a scheduled workflow, right-click it, and choose Create Node > Data Integration > Real-time Synchronization.

  3. In the Create Node dialog box, set Synchronization Method to Single Table (Topic) to Single Table (Topic) ETL, enter a Name, and select a Path.

  4. Click Confirm.

  5. On the editing page of the Real-time Synchronization node, click Conversion > Replace String, drag the node to the canvas, and connect it to the configured input node.

  6. Click the Replace String node. In the Node Configuration panel, configure the parameters.

    Parameter

    Description

    Rule

    A rule consists of the following parameters:

    • Field: Select an input field from the preceding node.

    • Regular matching: Specifies whether to use a regular expression.

    • Original string: The string or regular expression pattern to find.

    • New string: The replacement string.

    • Case Sensitive: Specifies whether the search is case-sensitive.

    Add Condition

    You can add multiple replacement rules.

    Output Field

    The resulting output fields.

  7. Click the 图标 icon in the toolbar.