Customize the matching critera Flatmap uses during a Join. This enables 1 to many or fuzzy logic that goes beyond the default exact Key match

Advanced Instruction

Signature

( leftKey: Iccn, leftRow: IccnNamespaceRow, rightKey: Iccn, rightRows: Seq[IccnNamespaceRow] ) : Seq[IccnNamespaceRow]

Remember that JoinRows instructions return a Sequence of rows to be returned, enabling you to build One to Many mappings.

Samples

JoinRows CaseInsensitive.scala

// JoinRows CaseInsensitive Sample
// ( leftKey: Iccn, leftRow: IccnNamespaceRow, rightKey: Iccn, rightRows: Seq[IccnNamespaceRow] ) : Seq[IccnNamespaceRow]

rightRows.filter { rightRow =>
  rightRow.string(rightKey).equalsIgnoreCase(leftRow.stringEmpty(leftKey))
}

JoinRows All.scala

// JoinRows All Sample
// Every left row will have ALL of the RightRows joined!
// Recommend using the JoinMany directive
// ( leftKey: Iccn, leftRow: IccnNamespaceRow, rightKey: Iccn, rightRows: Seq[IccnNamespaceRow] ) : Seq[IccnNamespaceRow]

rightRows