First union by name

Supported in: Batch

Unions a set of datasets together on columns from the first dataset, adding nulls when columns are missing. Columns that are not present in the first dataset are removed.

Transform categories: Join

Declared arguments

  • Datasets to union - The datasets being unioned together.
    List<Table>

Examples

Example 1: Base case

Argument values:

  • Datasets to union: [ri.foundry.main.dataset.a, ri.foundry.main.dataset.b]

Inputs: ri.foundry.main.dataset.a

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT

ri.foundry.main.dataset.b

recently_servicedtail_numberhome_country
trueAA-200US
trueBN-435UK
trueBN-111UK

Output:

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT
trueAA-200null
trueBN-435null
trueBN-111null

Example 2: Base case

Argument values:

  • Datasets to union: [ri.foundry.main.dataset.a, ri.foundry.main.dataset.b, ri.foundry.main.dataset.c]

Inputs: ri.foundry.main.dataset.a

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT

ri.foundry.main.dataset.b

home_countrytail_numberrecently_serviced
USAA-200true
UKBN-435true
UKBN-111true

ri.foundry.main.dataset.c

home_countrytail_number
DKSK-908
CHLX-17
INAI-144

Output:

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT
trueAA-200null
trueBN-435null
trueBN-111null
nullSK-908null
nullLX-17null
nullAI-144null

Example 3: Base case

Argument values:

  • Datasets to union: [ri.foundry.main.dataset.a, ri.foundry.main.dataset.b]

Inputs: ri.foundry.main.dataset.a

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT

ri.foundry.main.dataset.b

| |

Output:

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT

Example 4: Null case

Argument values:

  • Datasets to union: [ri.foundry.main.dataset.a, ri.foundry.main.dataset.b]

Inputs: ri.foundry.main.dataset.a

recently_servicedtail_numberairline_code
nullnullnull

ri.foundry.main.dataset.b

recently_servicedtail_numberhome_country
nullnullnull

Output:

recently_servicedtail_numberairline_code
nullnullnull
nullnullnull

Example 5: Edge case

Argument values:

  • Datasets to union: [ri.foundry.main.dataset.a, ri.foundry.main.dataset.b]

Inputs: ri.foundry.main.dataset.a

recently_servicedtail_numberairline_code

ri.foundry.main.dataset.b

recently_servicedtail_numberhome_country

Output:

recently_servicedtail_numberairline_code

Example 6: Edge case

Argument values:

  • Datasets to union: [ri.foundry.main.dataset.a]

Input:

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT

Output:

recently_servicedtail_numberairline_code
trueKK-150KK
falseXB-120XB
trueMT-190MT