Link Search Menu Expand Document

Joins

Joins allow you to make queries over multiple bounded or unbounded collections at the same time. Kio supports join operations for keyed collections and combine the data by keys over windows. There is the following methods to combine data of several collections:

PCollection<KV<K, V>>

Method Description
coGroup(other)
↪️ PCollection<KV<K, Pair<Iterable<V>, Iterable<X>>>>
Groups elements of both input collections into the one by keys.

Arguments:
· other: PCollection<K, X> - the second keyed collection to combine
join(other)
↪️ PCollection<KV<K, Pair<V, X>>>
Join elements of both input collections by keys and returns all pairs of the values.

Arguments:
· other: PCollection<K, X> - the second keyed collection to join
leftOuterJoin(other)
↪️ PCollection<KV<K, Pair<V, X?>>>
Join elements of both input collections by keys and returns all pairs of the values and null value for keys not found in the second collection.

Arguments:
· other: PCollection<K, X> - the second keyed collection to join
rightOuterJoin(other)
↪️ PCollection<KV<K, Pair<V?, X>>>
Join elements of both input collections by keys and returns all pairs of the values and null value for keys not found in the first collection.

Arguments:
· other: PCollection<K, X> - the second keyed collection to join
fullOuterJoin(other)
↪️ PCollection<KV<K, Pair<V?, X?>>>
Join elements of both input collections by keys and returns all pairs of the values and null value for keys not found in any collection.

Arguments:
· other: PCollection<K, X> - the second keyed collection to join
subtractByKey(other)
↪️ PCollection<KV<K, V>>
Returns a collection with all elements from the input collection with keys not found in the second collection.

Arguments:
· other: PCollection<K, X> - the second keyed collection to combine

PCollection<T>

Method Description
intersection(other)
↪️ PCollection<T>
Returns a collection of elements that exist in both input collections.

Arguments:
· other: PCollection<K, X> - the second collection to combine
subtract(other)
↪️ PCollection<T>
Returns a collection of elements that are contained in the first input collection, but not in the second.

Arguments:
· other: PCollection<K, X> - the second collection to combine