joinTables
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
Click + on the parent node.
Enter the Join Tables operator in the search field and select the Join Tables operator from the Results to open the operator form.
In the Tables drop-down, enter or select a table or a list of tables to join.
In the Columns field, click Add More to add the list of columns to join tables. These columns must be present in all tables.
In the Join Type field, enter the join type of the columns.
Click Run to view the result.
Click Save to add the operator to the playbook.
Click Cancel to discard the operator form.
Usage Details
LQL
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
:
LQL
joinTables([table1, table2], ["col1", "col2"], "inner")
Output1
:
col1 | col2 | Feature_1 | Feature_2 |
---|---|---|---|
3 | 4 | f2 | g1 |
Example2
:
LQL
joinTables([tab1e, table2], ["col1", "col2"], "outer")
Output2
:
col1 | col2 | Feature_1 | Feature_2 |
---|---|---|---|
1 | 2 | f1 | Â |
3 | 4 | f2 | g1 |
5 | 6 | Â | g2 |