String replace
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
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Data Development.
-
Hover over the
icon and choose . Alternatively, expand a scheduled workflow, right-click it, and choose .
-
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.
-
Click Confirm.
-
On the editing page of the Real-time Synchronization node, click , drag the node to the canvas, and connect it to the configured input node.
-
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.
-
-
Click the
icon in the toolbar.