# Add DataColumn

Adds a new column to the table. The column is defined by an existing `DataColumn` object or by giving a name and a data type. The input table is not modified; the result is written to the `Result` output.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `DataColumn` | `DataColumn` | ❌ No     | Column to add. Either `DataColumn` or `ColumnName` must be set. |
| `ColumnName` | `String` | ❌ No     | Name of the column to add. Either `DataColumn` or `ColumnName` must be set; if both are set, a new column is created with `ColumnName` and `ColumnType`. |
| `ColumnType` | `Type` | ❌ No     | Data type of the column added with `ColumnName`. Default: `Object`. |
| `DataTable` | `DataTable` | ✅ Yes    | Table to add the column to. If empty (null), a new table is created. |
| `DefaultValue` | `Object` | ❌ No     | Default value of the column. If set, it is also written to all existing rows. If the value does not match the column's data type, the activity throws an error. |


---

### :arrow_right:**OUTPUT**

| **Parameter** | **Type** | **Description** |
|-----------|------|-------------|
| `Result`  | `DataTable` | Table with the column added. |