Class InfoTableFunctions

All Implemented Interfaces:
IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAvatar, IEntityLifeCycleEvent, IPersistable, IServiceProvider, ITaggableObject, IDependencyScannableObject, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class InfoTableFunctions extends Resource
See Also:
  • Constructor Details Link icon

    • InfoTableFunctions Link icon

      public InfoTableFunctions()
  • Method Details Link icon

    • FromXML Link icon

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

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

      @Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,4}) public org.json.JSONObject ToJSON(InfoTable table) throws 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:
      Exception - if an error occurs
    • Clone Link icon

      Service Category:
      Creation
      Service Description:
      Clone an info table.
      Parameters:
      t1 - First table to join - INFOTABLE
      Returns:
      result Resultant data - INFOTABLE
      Throws:
      Exception - If an error occurs
    • Intersect Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Intersect(InfoTable t1, InfoTable t2, String columns1, String columns2, String joinColumns1, String joinColumns2, String joinType) throws 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:
      Exception - If an error occurs
    • Pivot Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Pivot(InfoTable t, String timestampColumn, String nameColumn, String valueColumn) throws 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:
      Exception - If an error occurs
    • Union Link icon

      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:
      Exception - If an error occurs
    • TimeShift Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable TimeShift(InfoTable t, String timestampField, Double shift) throws 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:
      Exception - If an error occurs
    • TopN Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable TopN(InfoTable t, Double maxItems) throws 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:
      Exception - If an error occurs
    • DeriveFields Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable DeriveFields(InfoTable t, String columns, String types, String expressions) throws 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:
      Exception - If an error occurs
    • RenameField Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable RenameField(InfoTable t, String from, String to) throws 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:
      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 Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Aggregate(InfoTable t, String columns, String aggregates, String groupByColumns) throws 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:
      Exception - If an error occurs
    • SetFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable SetFilter(InfoTable t, String fieldName, String matchValues, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • LikeFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable LikeFilter(InfoTable t, String fieldName, String pattern, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • RegexFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable RegexFilter(InfoTable t, String fieldName, String pattern, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • BetweenFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable BetweenFilter(InfoTable t, String fieldName, String minValue, String maxValue, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • GEFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GEFilter(InfoTable t, String fieldName, String value) throws 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:
      Exception - If an error occurs
    • GTFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GTFilter(InfoTable t, String fieldName, String value) throws 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:
      Exception - If an error occurs
    • LEFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable LEFilter(InfoTable t, String fieldName, String value) throws 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:
      Exception - If an error occurs
    • LTFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable LTFilter(InfoTable t, String fieldName, String value) throws 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:
      Exception - If an error occurs
    • EQFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable EQFilter(InfoTable t, String fieldName, String value) throws Exception
      Throws:
      Exception - If an error occurs
    • EQFilter Link icon

      @ThingworxExtensionApiMethod(since={7,3}) public InfoTable EQFilter(InfoTable t, String fieldName, String value, Boolean isCaseSensitive) throws 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:
      Exception - If an error occurs
    • NEFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable NEFilter(InfoTable t, String fieldName, String value) throws 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:
      Exception - If an error occurs
    • NearFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable NearFilter(InfoTable t, String fieldName, Location location, Double searchRadius, String units, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • TagFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable TagFilter(InfoTable t, String fieldName, TagCollection tags, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • MissingValueFilter Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable MissingValueFilter(InfoTable t, String fieldName, Boolean inclusive) throws 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:
      Exception - If an error occurs
    • Sort Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Sort(InfoTable t, String sortColumn, Boolean ascending) throws 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:
      Exception - If an error occurs
    • Interpolate Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Interpolate(InfoTable t, String timeColumn, String columns, String mode, Double count, String stats, org.joda.time.DateTime startDate, org.joda.time.DateTime endDate, Boolean ignoreMissingData) throws 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:
      Exception - If an error occurs
    • Combine Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Combine(InfoTable tables) throws 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:
      Exception - If an error occurs
    • Distinct Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Distinct(InfoTable t, String columns) throws 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:
      Exception - If an error occurs
    • Query Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable Query(InfoTable t, org.json.JSONObject query) throws 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:
      Exception - If an error occurs
    • DeleteQuery Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable DeleteQuery(InfoTable t, org.json.JSONObject query) throws 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:
      Exception - If an error occurs
    • UpdateQuery Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable UpdateQuery(InfoTable t, org.json.JSONObject query, InfoTable values) throws 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:
      Exception - If an error occurs
    • CreateInfoTableFromDataShape Link icon

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable CreateInfoTableFromDataShape(String infoTableName, String dataShapeName) throws 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:
      Exception - If an error occurs
    • CreateInfoTable Link icon

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