Insert from other dataset
Function and purpose of the operation¶
The Insert from another dataset operation allows you to populate one or more fields in a target dataset using values from a source dataset or calculated values.
In particular, it adds the rows present on the source dataset to the target dataset based on attribute-type field relationships shared between the two datasets.
If no matching fields are configured, the system automatically checks for possible matches based on the column names of the two datasets.
Advanced Tab (only visible for physical or virtual datasets)¶
The source scenario /period fields allow you to define a scenario/period from which to read data for the given source dataset. It is possible to specify a value using the AW parameters or through the same syntax used in the definition of cell fields. If the field is left blank, the DTP launch scenario/period is taken into account.
If a physical dataset is used and the specified scenario/period does not exist or is not active, the DTP proceeds without executing the operation, logging the missing execution in the audit.
Example
Source Dataset¶
| Category | Product | Price |
|---|---|---|
| Electronics | Laptop | 1329 |
| Electronics | Bluetooth Speaker | 99 |
| Electronics | Smartphone | 800 |
| Toys | Puzzle Game | 15 |
The source dataset has the columns Category, Product, and Price, while the target dataset only has Product and Price. Without explicit Matching fields, the system can match the two columns because they have the same names. Then the data processing copies the rows of these columns of the source dataset into the target dataset
Target Dataset¶
| Product | Price |
|---|---|
| Laptop | 1329 |
| Bluetooth Speaker | 99 |
| Smartphone | 800 |
| Puzzle Game | 15 |