TransformResult - Scoped, Global

  • Release version: Yokohama
  • Updated January 30, 2025
  • 1 minute to read
  • The TransformResult API provides methods that return the result of a transformation run on time-series data.

    You can use this API in both scoped and global server scripts. When using the Transformer class in a scoped application, use the sn_clotho namespace identifier.

    There is no constructor for this class. TransformResult objects are returned by many TransformPart methods.

    This class is part of the MetricBase application.

    TransformResult - byGroup()

    Returns an array of Data objects. Returns an error if no group was specified for the transform.

    Table 1. Parameters
    Name Type Description
    None
    Table 2. Returns
    Type Description
    Array An array of Data objects, with each object corresponding to a group.

    TransformResult - getByLabel(String label)

    Returns the transformed data with the specified label.

    Table 3. Parameters
    Name Type Description
    label String The label that identifies the data to be retrieved.
    Table 4. Returns
    Type Description
    Data The Data object with the transform results.

    TransformResult - getData()

    Returns a single Data object, or null if the result is empty.

    Table 5. Parameters
    Name Type Description
    None
    Table 6. Returns
    Type Description
    Data The Data object with the transform results.

    TransformResult - toArray()

    Returns the transformed data as an array. This method turns a Data object into an array.

    Table 7. Parameters
    Name Type Description
    None
    Table 8. Returns
    Type Description
    Array The Data object formatted as an array.