Skip to main content
Version: Java (Groovy)

proxy

The proxy method creates a PartitionedTable.Proxy that allows table operations to be applied to the constituent tables of the source PartitionedTable.

Each operation thus applied will produce a new PartitionedTable with the results, as in transform(UnaryOperator, Dependency...) or partitionedTransform(PartitionedTable, BinaryOperator, Dependency...), and return a new proxy to that PartitionedTable.

note

If the proxy overload with no parameters is used, the result is the same as proxy(true, true).

Syntax

proxy()
proxy(requireMatchingKeys, sanityCheckJoinOperations)

Parameters

ParameterTypeDescription
requireMatchingKeysboolean

Whether to ensure that both partitioned tables have all the same keys present when a proxied operation uses this and another PartitionedTable as inputs for a partitioned transform.

sanityCheckJoinOperationsboolean

Whether to check that proxied join operations will only find a given join key in one constituent table for this and the table argument if it is also a proxy.

Returns

A PartitionedTable.Proxy that allows table operations to be applied to the constituent tables of the source PartitionedTable.

Examples


source = emptyTable(10).update('Key = (i % 2 == 0) ? `X` : `Y`', 'Value = i')

partitionedTable = source.partitionBy('Key')

ptProxy = partitionedTable.proxy()

result = source.reverse()
proxyReversed = ptProxy.reverse()
resultFromProxy = proxyReversed.target.merge()