Class InfoTableFunctions

    • Constructor Detail

      • InfoTableFunctions

        public InfoTableFunctions()
    • Method Detail

      • FromXML

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable FromXML​(org.w3c.dom.Document xml)
                          throws java.lang.Exception
        Service Category:
        Conversion
        Service Description:
        Convert XML into an info table.
        Parameters:
        xml - XML content - XML
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • FromJSON

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable FromJSON​(org.json.JSONObject json)
                           throws java.lang.Exception
        Service Category:
        Conversion
        Service Description:
        Convert JSON into an info table.
        Parameters:
        json - JSON content - JSON
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • ToJSON

        @Deprecated
        @ThingworxExtensionApiMethod(since={6,6},
                                     deprecatedSince={8,4})
        public org.json.JSONObject ToJSON​(InfoTable table)
                                   throws java.lang.Exception
        Deprecated.
        no replacement
        Service Category:
        Conversion
        Service Description:
        Convert an info table into JSON.


        Convert an info table into JSON.
        Parameters:
        table - Info table
        Returns:
        Resultant data
        Throws:
        java.lang.Exception - if an error occurs
      • Clone

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Clone​(InfoTable t1)
                        throws java.lang.Exception
        Service Category:
        Creation
        Service Description:
        Clone an info table.
        Parameters:
        t1 - First table to join - INFOTABLE
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Intersect

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Intersect​(InfoTable t1,
                                   InfoTable t2,
                                   java.lang.String columns1,
                                   java.lang.String columns2,
                                   java.lang.String joinColumns1,
                                   java.lang.String joinColumns2,
                                   java.lang.String joinType)
                            throws java.lang.Exception
        Service Category:
        Combination
        Service Description:
        Returns an inner join of the two infotables.
        Parameters:
        t1 - First table to join - INFOTABLE
        t2 - Second table to join - INFOTABLE
        columns1 - Comma separated list of columns to include from table 1 - STRING
        columns2 - Comma separated list of columns to include from table 2 - STRING
        joinColumns1 - Comma separated list of columns from table 1 on which to join - STRING
        joinColumns2 - Comma separated list of columns from table 2 on which to join - STRING
        joinType - Join type (INNER, LEFT, RIGHT, FULL) - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Pivot

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Pivot​(InfoTable t,
                               java.lang.String timestampColumn,
                               java.lang.String nameColumn,
                               java.lang.String valueColumn)
                        throws java.lang.Exception
        Service Category:
        Transformation
        Service Description:
        Returns a transformation of a dataset with timestamp, name and value columns.
        Parameters:
        t - Source data - INFOTABLE
        timestampColumn - Timestamp column - STRING
        nameColumn - Name column - STRING
        valueColumn - Value column - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Union

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Union​(InfoTable t1,
                               InfoTable t2)
                        throws java.lang.Exception
        Service Category:
        Combination
        Service Description:
        Returns a single infotable with values from two tables. The tables must have the same DataShape.
        Parameters:
        t1 - First table to join - INFOTABLE
        t2 - Second table to join - INFOTABLE
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • TimeShift

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable TimeShift​(InfoTable t,
                                   java.lang.String timestampField,
                                   java.lang.Double shift)
                            throws java.lang.Exception
        Service Category:
        TimeInterpolation
        Service Description:
        Shift the time values for an infotable by a given amount.
        Parameters:
        t - Info table to truncate - INFOTABLE
        timestampField - Name of the timestamp field - STRING
        shift - Number of seconds to shift the values - NUMBER
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • TopN

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable TopN​(InfoTable t,
                              java.lang.Double maxItems)
                       throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Returns the top n rows.
        Parameters:
        t - Info table to truncate - INFOTABLE
        maxItems - Number of rows to return - NUMBER
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • DeriveFields

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable DeriveFields​(InfoTable t,
                                      java.lang.String columns,
                                      java.lang.String types,
                                      java.lang.String expressions)
                               throws java.lang.Exception
        Service Category:
        Calculations
        Service Description:
        Add additional columns based on expressions to existing infotable.
        Parameters:
        t - Info table to calculate on - INFOTABLE
        columns - Comma separated list of new field names - STRING
        types - Comma separated list of base types for new fields - STRING
        expressions - Comma separated list of expressions - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • RenameField

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable RenameField​(InfoTable t,
                                     java.lang.String from,
                                     java.lang.String to)
                              throws java.lang.Exception
        Service Category:
        Columns
        Service Description:
        Return an infotable with a column renamed.
        Parameters:
        t - Info table to rename - INFOTABLE
        from - Old field name - STRING
        to - New field name - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs

        Additional Information: This service supports using commas (",") or semicolons (";") as delimiters in the service call. Services can be used in expressions with the following limitations: 1.) You must use: Resources["InfoTableFunctions"].<service> rather than me.<service>. The "me." construct does not work 2.) Parameters can not be passed by reference. For example, this works: service( {<parameter 1>:<value 1>,<parameter 2>:<value 2>,...,<parameter N>:<value N> } ). If using a single service or function in the expressions, you must use a semicolon so that DeriveField understands the comma is part of the expression and not a delimiter.
      • Aggregate

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Aggregate​(InfoTable t,
                                   java.lang.String columns,
                                   java.lang.String aggregates,
                                   java.lang.String groupByColumns)
                            throws java.lang.Exception
        Service Category:
        Aggregates
        Service Description:
        .
        Parameters:
        t - Info table to aggregate - INFOTABLE
        columns - Comma separated list of columns to aggregate - STRING
        aggregates - Comma separated list of aggregate types (MIN, MAX, AVERAGE, SUM, COUNT) - STRING
        groupByColumns - Comma separated list of columns to group on - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • SetFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable SetFilter​(InfoTable t,
                                   java.lang.String fieldName,
                                   java.lang.String matchValues,
                                   java.lang.Boolean inclusive)
                            throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Set of values filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        matchValues - Semicolon separated list of values to match - STRING
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • LikeFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable LikeFilter​(InfoTable t,
                                    java.lang.String fieldName,
                                    java.lang.String pattern,
                                    java.lang.Boolean inclusive)
                             throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Pattern matching filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        pattern - Pattern to match - STRING
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • RegexFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable RegexFilter​(InfoTable t,
                                     java.lang.String fieldName,
                                     java.lang.String pattern,
                                     java.lang.Boolean inclusive)
                              throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Pattern matching filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        pattern - Pattern to match - STRING
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • BetweenFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable BetweenFilter​(InfoTable t,
                                       java.lang.String fieldName,
                                       java.lang.String minValue,
                                       java.lang.String maxValue,
                                       java.lang.Boolean inclusive)
                                throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Range filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        minValue - Minimum value for range - STRING
        maxValue - Maximum value for range - STRING
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • GEFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GEFilter​(InfoTable t,
                                  java.lang.String fieldName,
                                  java.lang.String value)
                           throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Greater than or equal filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        value - Value to compare - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • GTFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GTFilter​(InfoTable t,
                                  java.lang.String fieldName,
                                  java.lang.String value)
                           throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Greater than filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        value - Value to compare - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • LEFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable LEFilter​(InfoTable t,
                                  java.lang.String fieldName,
                                  java.lang.String value)
                           throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Less than or equal filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        value - Value to compare - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • LTFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable LTFilter​(InfoTable t,
                                  java.lang.String fieldName,
                                  java.lang.String value)
                           throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Less than filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        value - Value to compare - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • EQFilter

        @ThingworxExtensionApiMethod(since={7,3})
        public InfoTable EQFilter​(InfoTable t,
                                  java.lang.String fieldName,
                                  java.lang.String value,
                                  java.lang.Boolean isCaseSensitive)
                           throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Equality filter with case sensitivity flag.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        value - Value to compare - STRING
        isCaseSensitive - Flag to turn case sensitivity on/off - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • NEFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable NEFilter​(InfoTable t,
                                  java.lang.String fieldName,
                                  java.lang.String value)
                           throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Not equal filter.
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        value - Value to compare - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • NearFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable NearFilter​(InfoTable t,
                                    java.lang.String fieldName,
                                    Location location,
                                    java.lang.Double searchRadius,
                                    java.lang.String units,
                                    java.lang.Boolean inclusive)
                             throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Location filter (nearness).
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        location - Center point of search - LOCATION
        searchRadius - Search radius - NUMBER
        units - Search radius units (K = km, M = miles, N = nautical miles) - STRING
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • TagFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable TagFilter​(InfoTable t,
                                   java.lang.String fieldName,
                                   TagCollection tags,
                                   java.lang.Boolean inclusive)
                            throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Filter by tag value(s).
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        tags - Tags to filter on - TAGS
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • MissingValueFilter

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable MissingValueFilter​(InfoTable t,
                                            java.lang.String fieldName,
                                            java.lang.Boolean inclusive)
                                     throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Filter by missing value(s).
        Parameters:
        t - Info table to filter - INFOTABLE
        fieldName - Field name on which to filter - STRING
        inclusive - Include or exclude matching rows - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Sort

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Sort​(InfoTable t,
                              java.lang.String sortColumn,
                              java.lang.Boolean ascending)
                       throws java.lang.Exception
        Service Category:
        Sorting
        Service Description:
        Sort InfoTable on a specified field.
        Parameters:
        t - Info table to sort - INFOTABLE
        sortColumn - Column on which to sort - STRING
        ascending - Ascending or descending sort (ascending = true) - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Interpolate

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Interpolate​(InfoTable t,
                                     java.lang.String timeColumn,
                                     java.lang.String columns,
                                     java.lang.String mode,
                                     java.lang.Double count,
                                     java.lang.String stats,
                                     org.joda.time.DateTime startDate,
                                     org.joda.time.DateTime endDate,
                                     java.lang.Boolean ignoreMissingData)
                              throws java.lang.Exception
        Service Category:
        TimeInterpolation
        Service Description:
        Perform time-based interpolation on an InfoTable.
        Parameters:
        t - Info table to sort - INFOTABLE
        timeColumn - Time column name - STRING
        columns - Semicolon separated list of field names - STRING
        mode - Interpolation Mode (ROWCOUNT or INTERVAL) - STRING
        count - Number of rows to return - NUMBER
        stats - Statistic type for interpolation (LAST, SMOOTH, AVG, TAVG, MIN, MAX) - STRING
        startDate - Start date of range - DATETIME
        endDate - End date of range - DATETIME
        ignoreMissingData - Ignore missing data in calculations - BOOLEAN
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Combine

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Combine​(InfoTable tables)
                          throws java.lang.Exception
        Service Category:
        Interpolation
        Service Description:
        Combine multiple time series data sets to an InfoTable.
        Parameters:
        tables - Info tables to combine - INFOTABLE
        Returns:
        result Resultant data - INFOTABLE - Aspects {dataShape:TimeSeriesDataset}
        Throws:
        java.lang.Exception - If an error occurs
      • Distinct

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Distinct​(InfoTable t,
                                  java.lang.String columns)
                           throws java.lang.Exception
        Service Category:
        Aggregates
        Service Description:
        Extract a set of distinct values for a specified field.
        Parameters:
        t - Info table to reduce to distinct rows - INFOTABLE
        columns - Comma separated list of columns to determine distinct rows - STRING
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • Query

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable Query​(InfoTable t,
                               org.json.JSONObject query)
                        throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Generic query.
        Parameters:
        t - Info table to query - INFOTABLE
        query - Query expression - QUERY
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • DeleteQuery

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable DeleteQuery​(InfoTable t,
                                     org.json.JSONObject query)
                              throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Delete rows that match a query.
        Parameters:
        t - Info table to query - INFOTABLE
        query - Query expression - QUERY
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • UpdateQuery

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable UpdateQuery​(InfoTable t,
                                     org.json.JSONObject query,
                                     InfoTable values)
                              throws java.lang.Exception
        Service Category:
        Filters
        Service Description:
        Update rows that match a query with a provided set of values.
        Parameters:
        t - Info table to query - INFOTABLE
        query - Query expression - QUERY
        values - Fields/values to update - INFOTABLE
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • CreateInfoTableFromDataShape

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable CreateInfoTableFromDataShape​(java.lang.String infoTableName,
                                                      java.lang.String dataShapeName)
                                               throws java.lang.Exception
        Service Category:
        Creation
        Service Description:
        Create an InfoTable from a specified data shape.
        Parameters:
        infoTableName - Name for the infotable - STRING
        dataShapeName - Name of the data shape from which to create the infotable - DATASHAPENAME
        Returns:
        result Resultant data - INFOTABLE
        Throws:
        java.lang.Exception - If an error occurs
      • CreateInfoTable

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable CreateInfoTable​(java.lang.String infoTableName)
        Service Category:
        Creation
        Service Description:
        Create an empty InfoTable.
        Parameters:
        infoTableName - Name for the infotable - STRING
        Returns:
        result Resultant data - INFOTABLE