# combine

Function

Source: https://github.com/playcanvas/splat-transform/blob/b6424a5b3b929695fbaafe738a995adb1240d675/src/lib/data-table/combine.ts#L26

```ts
combine(dataTables: DataTable[]): DataTable
```

Combines multiple DataTables into a single DataTable.

Merges rows from all input tables. Columns are matched by name and type;
columns that don't exist in all tables will have undefined values for
rows from tables lacking that column.

If tables have differing source transforms, all data is first converted
to engine coordinate space (identity transform) before combining.

**Parameters**

- `dataTables` ([`DataTable`](https://api.playcanvas.com/splat-transform/classes/DataTable.md)`[]`): Array of DataTables to combine.

**Returns** [`DataTable`](https://api.playcanvas.com/splat-transform/classes/DataTable.md): A new DataTable containing all rows from all input tables.

**Example**

```ts
const combined = combine([tableA, tableB, tableC]);
console.log(combined.numRows); // tableA.numRows + tableB.numRows + tableC.numRows
```
