lsj#

swordfish.function.lsj()#

Left join (lj) return all records from the left table and the matched records from the right table. The result is NULL from the right table if there is no match. If there are more than one matched record in the right table, all the matched records in the right table are returned. Left join may return more rows than the left table.

The only difference between left semi join (lsj) and left join (lj) is that for left semi join, if there are more than one matched record in the right table, only the first record is returned. Left semi join returns the same number of rows as the left table.

Parameters:
  • leftTable (Constant) – The table to be joined.

  • rightTable (Constant) – The table to be joined.

  • matchingCols (Constant) – A string scalar/vector indicating the matching column(s).

  • rightMatchingCols (Constant) – A string scalar/vector indicating the matching column(s) in rightTable. This optional argument must be specified if at least one of the matching columns has different names in leftTable and rightTable . The joining column names in the result will be the joining column names from the left table.

  • leftFilter (Constant) – A condition expression used as filter condition for the columns in the left table. Use “and” or “or” to join multiple conditions.

  • rightFilter (Constant) – A condition expression used as filter condition for the columns in the right table. Use “and” or “or” to join multiple conditions.