Add Rows
Updated: September 21, 2017
Appends a set of rows from an input dataset to the end of another dataset
Category: Data Transformation / Manipulation
This article describes how to use the Add Rows module in Azure Machine Learning to concatenate two datasets. In concatenation, the rows of the second dataset are added to the end of the first dataset.
Concatenation of rows is useful in scenarios such as these:
You have generated a series of evaluation statistics, and you want to combine them into one table for easier reporting.
You have been working with different datasets, and you want to combine the datasets to create a final dataset.
Drag the Add Rows module into your experiment, You can find it under Data Transformation, Manipulate.
Connect the datasets to the two input ports. The dataset that you want to append should be connected to the second (right) port.
When adding two datasets together, these rules apply:
To concatenate rows together, the rows must have the same schema. This means, the same number of columns, and the same type of data in the columns.
If you add the same dataset to both inputs of the Add Rows module, the dataset will be duplicated.
Run the experiment.
The number of rows in the output dataset should equal the sum of the rows of both input datasets.
This section describes implementation details and common questions.
You cannot filter the source dataset when adding rows. All the rows from both datasets provided as inputs are concatenated when you use Add Rows.
If you want to add only a few rows, use Partition and Sample to define a condition by which to filter the rows and generate a dataset with only the rows you want.
You can see examples of how this module is used by exploring these sample experiments in the Model Gallery:
The Demand estimation sample combines the result of evaluating multiple models into a single dataset and passes it to an Execute R Script for custom processing
In the Breast cancer detection sample, datasets that contain useful features are cleaned and then combined by using Add Rows, Add Columns, and Join Data.
The Prediction of student performance sample uses Add Rows to combine the results of custom metrics that are computed by using Apply Math Operation.
The Time Series Forecasting sample uses R scripts to generate custom metrics and then combines them in a single table by using Add Rows.
| Name | Type | Description |
|---|---|---|
| Dataset1 | Data Table | Dataset rows to be added to the output dataset first |
| Dataset2 | Data Table | Dataset rows to be appended to the first dataset |
| Name | Type | Description |
|---|---|---|
| Results dataset | Data Table | Dataset that contains all rows of input datasets |
For a list of all exceptions, see Module Error Codes.
| Exception | Description |
|---|---|
| Error 0003 | An exception occurs if one or more of input datasets is null or empty. |
| Error 0010 | An exception occurs if input datasets have column names that should match but do not. |
| Error 0016 | An exception occurs if input datasets passed to the module should have compatible column types but do not. |
| Error 0008 | An exception occurs if the parameter is not in range. |