Friday, April 26, 2013

Vector function-Transformer



Use the vector function to access an element in a vector column.
The function is in the Vector category of the expression editor. The examples show the function as it appears in a Derivation field in the Transformer stage.

ElementAt

Accesses an element of a vector. The vector index starts at 0. The function can be used as part of, or the whole of an expression.
Input: input_column (column name) index (int)
Output: element of vector
Examples. The following example outputs the second element of the vector in the column mylink.myvector.
      ElementAt(mylink.myvector, 2)
The following example outputs the second element of the vector in the column mylink.myvector and adds one it.
ElementAt(mylink.myvector, 2)+1
Vector function
Use the vector function to access an element in a vector column.
The function is in the Vector category of the expression editor. The examples show the function as it appears in a Derivation field in the Transformer stage.
ElementAt
Accesses an element of a vector. The vector index starts at 0. The function can be used as part of, or the whole of an expression.
·         Input: input_column (column name) index (int)
·         Output: element of vector
·         Examples. The following example outputs the second element of the vector in the column mylink.myvector.
ElementAt(mylink.myvector, 2)
The following example outputs the second element of the vector in the column mylink.myvector and adds one it.

No comments: