0 / 0
Vector function

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 third element of the vector in the column mylink.myvector.
    ElementAt(mylink.myvector, 2)
    
    The following example outputs the third element of the vector in the column mylink.myvector and adds one it.
    ElementAt(mylink.myvector, 2) + 1
    
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more