In DataWorks, you can use the data filtering component to configure filtering rules for specific fields in real-time single-table Data Integration tasks.
Step 1: Configure the data integration task
Create a data source. For more information, see Data source management.
Create a Data Integration task. For more information, see Configure a single-table real-time synchronization task.
NoteFor single-table real-time Data Integration tasks, you can add a data processing component between the source and destination components. For more information, see Supported data sources and synchronization solutions.
Step 2: Add the data filtering component
In the real-time single-table synchronization task, enable the Data Processing toggle, click +Add Node, and then select the Data Filter component.
Configure the filtering rules.
Field Name: Select an input field. This field's value is the left operand of the conditional expression.
Judgement: Select a comparison operator. The following table describes the available operators.
Value: The right operand of the conditional expression. You can select an input field from the upstream node or enter a constant value. Regular expressions are not supported for constant values. Java escape sequences are supported, such as
\t(tab character),\n(line feed), and\u0001(Unicode character).
Add rule: You can add multiple filtering rules. For example, enter
Filterin the Name field and set a condition where the Field Name is_key_, the comparison operator is equals, the value type is string, and the Value iskey1. Use the + and − buttons to add or remove rules, or click + Add condition group to create a group.
Next steps
After you configure the data source and Data filtering components, click Preview Data Output to review the output from the current node and verify that it meets your requirements.