Streamable.Unpivot<TKey,TInput,TPivotKey,TValue,TResult> Method

Definition

Rotates a stream of payload objects into a stream of key-attribute-value triples corresponding to the data from the input payloads.

public static Microsoft.StreamProcessing.IStreamable<TKey,TResult> Unpivot<TKey,TInput,TPivotKey,TValue,TResult> (this Microsoft.StreamProcessing.IStreamable<TKey,TInput> inputStreamable, System.Linq.Expressions.Expression<Func<TResult>> initializer, System.Linq.Expressions.Expression<Func<TInput,TPivotKey>> keySelector, System.Linq.Expressions.Expression<Func<TResult,string>> attributeSelector, System.Linq.Expressions.Expression<Func<TResult,TValue>> valueSelector) where TResult : new();
static member Unpivot : Microsoft.StreamProcessing.IStreamable<'Key, 'Input> * System.Linq.Expressions.Expression<Func<'Result>> * System.Linq.Expressions.Expression<Func<'Input, 'PivotKey>> * System.Linq.Expressions.Expression<Func<'Result, string>> * System.Linq.Expressions.Expression<Func<'Result, 'Value>> -> Microsoft.StreamProcessing.IStreamable<'Key, 'Result (requires 'Result : (new : unit -> 'Result))> (requires 'Result : (new : unit -> 'Result))
<Extension()>
Public Function Unpivot(Of TKey, TInput, TPivotKey, TValue, TResult) (inputStreamable As IStreamable(Of TKey, TInput), initializer As Expression(Of Func(Of TResult)), keySelector As Expression(Of Func(Of TInput, TPivotKey)), attributeSelector As Expression(Of Func(Of TResult, String)), valueSelector As Expression(Of Func(Of TResult, TValue))) As IStreamable(Of TKey, TResult)

Type Parameters

TKey

The type of the grouping key of the input streamable.

TInput

The type of the payload of the input streamable.

TPivotKey

The type of the unpivot key.

TValue

The type of the value component of the unpivot operation.

TResult

The type of the result.

Parameters

inputStreamable
IStreamable<TKey,TInput>

The source streamable to unpivot.

initializer
Expression<Func<TResult>>

A constructor describing how to create output values.

keySelector
Expression<Func<TInput,TPivotKey>>

A selector function returning the unpivot key.

attributeSelector
Expression<Func<TResult,String>>

A selector function stating what field in the return type holds desired unpivoted attributes.

valueSelector
Expression<Func<TResult,TValue>>

A selector function stating what field in the return type holds desired unpivoted values.

Returns

IStreamable<TKey,TResult>

A stream of key-attribute-value triples corresponding to the original data stream.

Applies to