outer-join

Does a left outer join with SheetRight keyed on either the header names they have in common or the arguments, which come in pairs of first the left's header name and then the right's header name.

pebblestream:outer-join(SheetRight, [ ["Key Left", "Key Right",] ...])

Example 1

For example, consider relating customers to their orders. Here is the Customer worksheet.

Customer IDName
0John
1James
2Alex
3Linda

And here is the Orders worksheet.

Order IDAmountCustomer ID
050
110
282
361
427

And here is the Customers-Orders worksheet. We obtain this worksheet by placing the following directive in a comment on the Customer-Orders worksheet.

pebblestream:from(Customers)
pebblestream:outer-join(Orders)
NameCustomer IDOrder ID
John005
John011
James130
Alex228
Linda3

Example 2

In this next example, the user explicitly set the outer join criteria.

Here is the Transfers worksheet.

FromToAmount
A0A124
A0A1576
A2A113
A1A042
A3A078

And here is the Taxable worksheet.

Account FromAccount ToTaxable
A0A1TRUE
A0A2FALSE
A1A0FALSE
A1A2TRUE
A2A0FALSE
A2A1TRUE
A1A3FALSE

And here is the Transfers-Taxable worksheet. The user can create this worksheet using this directive declaration:

pebblestream:from(Transfers)
pebblestream:outer-join(Taxable, "From", "Account From", "To", "Account To")
AmountFromTo
24A0A1TRUE
576A0A1TRUE
13A2A1TRUE
42A1A0FALSE
78A3A0