This gem runs in .
Overview
Use the UnionByName gem to combine rows from multiple datasets by matching column names. This can help when working with data from different sources where schemas might vary slightly in order or structure, but the column names are consistent.Prerequisites
- Add
prophecy_basicspackage version 1.0.0 or higher to your project.
Input and Output
To add additional input ports, click
+ next to Ports.
Parameters
Example
Let’s say you’re working with two tables: Table A and Table B.- Both tables contain order-related data.
- Table B is missing the
amountcolumn that exists in Table A. - The columns in Table B that match Table A are ordered differently.
Table A
Table B
Result
The table below shows the output after running a UnionByName gem with Allow Missing Columns enabled. Since Table B doesn’t have theamount column, Prophecy fills in null values for rows coming from Table B.

