You want to distribute processed data to multiple tables based on different filtering criteria. Using multiple scheduled tasks for this purpose requires multiple reads from the source table, which is time-consuming and impacts performance.
The Data Transformation node supports simultaneous data distribution to multiple target tables. You can select specific fields from a source table, apply distinct filtering conditions to each output operator, and distribute processed data to respective target tables, as shown in the following figure.
You can download the example table: Customer_and_Order_Information.xls
You want to split the Customer_and_Order_Information table into SCustomer and SProduct tables.
For example, you want to output the fields Owner_Name, Owner_Address, Owner_City, Owner_Region, Owner_Postal_Code, Owner_Country, Owner_Province, and Owner_TEL to the SCustomer table and output Product_ID, Product_Name, and Unit_Price to the SProduct table.
1. Create a scheduled task and drag a Data Transformation node onto the page, as shown in the following figure.
Click Data Transformation node to enter the editing page, drag in a DB Table Input operator, and configure the data input, as shown in the following figure.
Adding Two DB Table Output Operators
1. Drag in two DB Table Output operators and connect them to the DB Table Input operator, as shown in the following figure.
2. Rename the two DB Table Output operators Product Table and Customer Table, respectively.
Distributing Data
1. Right-click the DB Table Input operator and click Data Distribution, as shown in the following figure.
2. Configure the data distribution conditions. Distribute the fields Owner_Name, Owner_Address, Owner_City, Owner_Region, Owner_Postal_Code, Owner_Country, Owner_Province, and Owner_TEL to the SCustomer table and Product_ID, Product_Name, and Unit_Price to the SProduct table, as shown in the following figure.
The following table describes the setting items.
You can configure the distribution condition.
You can click the Data Preview button in the Data Distribution window to preview the output data of different branches, as shown in the following figure.
Configuring Target Tables
Configure the DB Table Output operator named Product Table, as shown in the following figure.
Configure the DB Table Output operator named Customer Table, as shown in the following figure.
Click Run to execute the task. The running result in Log upon successful execution is shown in the following figure.
The following figure shows data in the SProduct table.
The following figure shows data in the SCustomer table.
滑鼠選中內容,快速回饋問題
滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。
不再提示
10s後關閉
Submitted successfully
Network busy