joinTables

Joins multiple tables.

This operator joins tables based on columns in the parameters. Columns used for joining must be present in all tables, and they should not include other common fields like lhub_id and lhub_page_num.

Operator Usage in Easy Mode

  1. Click + on the parent node.
  2. Enter the Join Tables operator in the search field and select the Join Tables operator from the Results to open the operator form.
  3. In the Tables drop-down, enter or select a table or a list of tables to join.
  4. In the Columns field, click Add More to add the list of columns to join tables. These columns must be present in all tables.
  5. In the Join Type field, enter the join type of the columns.
  6. Click Run to view the result.
  7. Click Save to add the operator to the playbook.
  8. Click Cancel to discard the operator form.

Usage Details

joinTables(tables, columns, joinType)

Input
tables: List of 2 or more tables to join. Example [t1, t2, t3].
columns: List of columns to join tables. These columns must be present in all tables. Example: [c1, c2]. These columns c1, c2 should be present in all the tables.
joinType: Join type should be one of following: inner, outer, full, full_outer, left, left_outer, right, right_outer, left_semi, left_anti

Output
Output of joined tables is returned

Example

table1:

col1

col2

Feature_1

1

2

f1

3

4

f2

table2:

col1

col2

Feature_2

3

4

g1

5

6

g2

Example1:

joinTables([table1, table2], ["col1", "col2"], "inner")

Output1:

col1

col2

Feature_1

Feature_2

3

4

f2

g1

Example2:

joinTables([tab1e, table2], ["col1", "col2"], "outer")

Output2:

col1

col2

Feature_1

Feature_2

1

2

f1

3

4

f2

g1

5

6

g2


Did this page help you?