Multi-Join

The Multi-Join feature joins the unique rows from a set of multiple tables onto a set of common keys.

Unlike most table operations, Multi-Join is not a constituent method of the Table class; instead, it is an external function that takes tables as arguments. Also, unlike most table operations, Multi-Join does not return a table -- it returns a MultiJoinTable object, which in turn uses the table() method to return the underlying table.

Syntax

Parameters

ParameterTypeDescription
keysString[]

A String array containing key column names; e.g., ["key1", "key2"].

inputTablesTable...

Any number of tables to be joined together.

columnsToMatchString

A list of key columns in string format (e.g., "ResultKey=SourceKey" or "KeyInBoth"). If there is more than one key, they must be separated with commas (e.g., "key1, key2, key3").

Note

Like natural_join, multi_join will fail if there are duplicates in the key columns.

multiJoinInputsMultiJoinInput...

A list of MultiJoinInput objects.

Returns

A MultiJoinTable object.

Examples

In this example, we will create a MultiJoinTable using two keys and a list of three source tables.

In this example, we will create a MultiJoinTable using a list of MultiJoinInput objects.